Пример #1
0
        public void IracingStopped()
        {
            displayConnection.ClearDisplay();
            displayConnection.SendMessage(GetClockString());

            clockTimer           = new System.Timers.Timer(60000);
            clockTimer.Elapsed  += TimerTick;
            clockTimer.AutoReset = true;
            clockTimer.Enabled   = true;
            clockTimer.Start();
        }
Пример #2
0
        private void OnTelemetryUpdated(object sender, SdkWrapper.TelemetryUpdatedEventArgs e)
        {
            float TCValue = 99;

            try
            {
                var tcVar = wrapper.GetTelemetryValue <float>("dcTractionControl");
                TCValue = tcVar.Value;
                if (TCValue < 0)
                {
                    TCValue = 99;
                }
            }
            catch {}

            float BBValue = 99;

            try
            {
                var bbVar = wrapper.GetTelemetryValue <float>("dcBrakeBias");
                BBValue = bbVar.Value;
                if (BBValue < 10)
                {
                    BBValue = 99;
                }
            }
            catch {}

            dataParser.ParseTelemetry(e, (int)TCValue, Math.Round(BBValue, 2));

            displayConnection.SendMessage(dataParser.GetDisplayString(), dataParser.GetLedAmount(), dataParser.GetDotBin());
        }