public override void HandleEvent(BrakeControllerEvent evt, float?value) { switch (evt) { case BrakeControllerEvent.StartIncrease: NotchController.StartIncrease(value); break; case BrakeControllerEvent.StartDecrease: NotchController.StartDecrease(value); break; case BrakeControllerEvent.SetCurrentPercent: if (value != null) { float newValue = value.Value; NotchController.SetPercent(newValue); } break; case BrakeControllerEvent.SetCurrentValue: if (value != null) { float newValue = value.Value; NotchController.SetValue(newValue); } break; case BrakeControllerEvent.StartDecreaseToZero: NotchController.StartDecrease(value, true); break; } }
public override void HandleEvent(BrakeControllerEvent evt) { switch (evt) { case BrakeControllerEvent.StartIncrease: NotchController.StartIncrease(); break; case BrakeControllerEvent.StopIncrease: NotchController.StopIncrease(); break; case BrakeControllerEvent.StartDecrease: NotchController.StartDecrease(); break; case BrakeControllerEvent.StopDecrease: NotchController.StopDecrease(); break; } }