Beispiel #1
0
        private void SendTargetPower(float power)
        {
            var command = new ControlTargetPowerPage
            {
                TargetPower = (ushort)(power * 4)
            };

            simulator.SendTargetPower(command);
        }
Beispiel #2
0
        private async Task SendTargetPowerAsync(string targetPowerString)
        {
            var targetPower = int.Parse(targetPowerString);

            if (feDisplay.FeState != FitnessEquipment.FeState.Asleep && CanSendCommand)
            {
                lastOutwardCommandTime = DateTime.Now;
                await Task.Run(() =>
                {
                    Trace.TraceInformation("Sending target power : " + targetPowerString);
                    feDisplay.SendTargetPower(new ControlTargetPowerPage()
                    {
                        TargetPower = (ushort)(targetPower * 4)
                    });
                });
            }
        }