bugfix: speed sensor input under ChibiOS 3.0 was broken

This commit is contained in:
rusEfi 2017-04-21 23:05:48 -04:00
parent f54eb4ea8e
commit 296d8d1584
2 changed files with 2 additions and 1 deletions

View File

@ -211,6 +211,7 @@ void startInputDriver(digital_input_s *hw, bool isActiveHigh) {
}
wave_icucfg.channel = getInputCaptureChannel(hw->brainPin);
efiIcuStart(driver, &wave_icucfg);
icuStartCapture(driver); // this would change state from READY to WAITING
icuEnableNotifications(driver);
}
hw->started = true;

View File

@ -123,7 +123,7 @@ static ICUDriver *turnOnTriggerInputPin(const char *msg, brain_pin_e hwPin, ICUC
efiIcuStart(driver, icucfg);
if (driver->state == ICU_READY) {
icuStartCapture(driver);
icuStartCapture(driver); // this would change state from READY to WAITING
icuEnableNotifications(driver);
} else {
// we would be here for example if same pin is used for multiple input capture purposes