void ISpeedRegulator_evNewSpeedSettingCalculated(object sender, NewSpeedSettingCalculatedEventArgs args) { if (args.getSpeedSetting() > 0) { servoDriver.setThrottle(args.getSpeedSetting()); } else { servoDriver.setThrottle(0.0); } }
void SpeedRegulator_evNewSpeedSettingCalculated(object sender, NewSpeedSettingCalculatedEventArgs args) { UpdateTextBlock(textBlock_steeringSpeed, args.getSpeedSetting(), steeringSpeedLabelData); //target for brake regulator double targetBrake = args.getSpeedSetting(); if (targetBrake < 0) { targetBrake *= -1; } else { targetBrake = 0; } UpdateTextBlock(textBlock_targetBrake, targetBrake, targetBrakeLabelData); }
void PIDSpeedRegulator_evNewSpeedSettingCalculated(object sender, NewSpeedSettingCalculatedEventArgs args) { Logger.Log(this, String.Format("new speed setting calculated: {0}", args.getSpeedSetting())); }
private void SpeedRegulator_evNewSpeedSettingCalculated(object sender, NewSpeedSettingCalculatedEventArgs args) { Model.CarInfo.SpeedSteering = args.getSpeedSetting(); Model.CarInfo.TargetBrake = args.getSpeedSetting() * -1; }
void MFCSPeedRegulator_evNewSpeedSettingCalculated(object sender, NewSpeedSettingCalculatedEventArgs args) { CarModel.ThrottleOppeningLevel = args.getSpeedSetting() / 100.0d; }
void ISpeedRegulator_evNewSpeedSettingCalculated(object sender, NewSpeedSettingCalculatedEventArgs args) { model.SpeedSteering = args.getSpeedSetting(); }
void SpeedRegulator_evNewSpeedSettingCalculated(object sender, NewSpeedSettingCalculatedEventArgs args) { UpdateTextBlock(textBlock_steeringSpeed, args.getSpeedSetting(), steeringSpeedLabelData); //target for brake regulator double targetBrake = args.getSpeedSetting(); if(targetBrake < 0) { targetBrake *= -1; } else { targetBrake = 0; } UpdateTextBlock(textBlock_targetBrake, targetBrake, targetBrakeLabelData); }