Exemple #1
0
 void ISpeedRegulator_evNewSpeedSettingCalculated(object sender, NewSpeedSettingCalculatedEventArgs args)
 {
     if (args.getSpeedSetting() > 0)
     {
         servoDriver.setThrottle(args.getSpeedSetting());
     }
     else
     {
         servoDriver.setThrottle(0.0);
     }
 }
Exemple #2
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);
        }
Exemple #3
0
 void PIDSpeedRegulator_evNewSpeedSettingCalculated(object sender, NewSpeedSettingCalculatedEventArgs args)
 {
     Logger.Log(this, String.Format("new speed setting calculated: {0}", args.getSpeedSetting()));
 }
Exemple #4
0
 void PIDSpeedRegulator_evNewSpeedSettingCalculated(object sender, NewSpeedSettingCalculatedEventArgs args)
 {
     Logger.Log(this, String.Format("new speed setting calculated: {0}", args.getSpeedSetting()));
 }
Exemple #5
0
 private void SpeedRegulator_evNewSpeedSettingCalculated(object sender, NewSpeedSettingCalculatedEventArgs args)
 {
     Model.CarInfo.SpeedSteering = args.getSpeedSetting();
     Model.CarInfo.TargetBrake = args.getSpeedSetting() * -1;
 }
Exemple #6
0
 void MFCSPeedRegulator_evNewSpeedSettingCalculated(object sender, NewSpeedSettingCalculatedEventArgs args)
 {
     CarModel.ThrottleOppeningLevel = args.getSpeedSetting() / 100.0d;
 }
Exemple #7
0
 private void SpeedRegulator_evNewSpeedSettingCalculated(object sender, NewSpeedSettingCalculatedEventArgs args)
 {
     Model.CarInfo.SpeedSteering = args.getSpeedSetting();
     Model.CarInfo.TargetBrake   = args.getSpeedSetting() * -1;
 }
Exemple #8
0
 void ISpeedRegulator_evNewSpeedSettingCalculated(object sender, NewSpeedSettingCalculatedEventArgs args)
 {
     model.SpeedSteering = args.getSpeedSetting();
 }
Exemple #9
0
 void MFCSPeedRegulator_evNewSpeedSettingCalculated(object sender, NewSpeedSettingCalculatedEventArgs args)
 {
     CarModel.ThrottleOppeningLevel = args.getSpeedSetting() / 100.0d;
 }
Exemple #10
0
 void ISpeedRegulator_evNewSpeedSettingCalculated(object sender, NewSpeedSettingCalculatedEventArgs args)
 {
     if (args.getSpeedSetting() > 0)
     {
         servoDriver.setThrottle(args.getSpeedSetting());
     }
     else
     {
         servoDriver.setThrottle(0.0);
     }
 }
Exemple #11
0
 void ISpeedRegulator_evNewSpeedSettingCalculated(object sender, NewSpeedSettingCalculatedEventArgs args)
 {
     model.SpeedSteering = args.getSpeedSetting();
 }
Exemple #12
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);
        }