Browse Source

AP_ICEngine: Initialize start_chan_last_value and catch RC values less than 800

c415-sdk
Dan Laks 5 years ago committed by Andrew Tridgell
parent
commit
54c827a792
  1. 2
      libraries/AP_ICEngine/AP_ICEngine.cpp
  2. 2
      libraries/AP_ICEngine/AP_ICEngine.h

2
libraries/AP_ICEngine/AP_ICEngine.cpp

@ -171,7 +171,7 @@ void AP_ICEngine::update(void)
// while ignoring tiny noise // while ignoring tiny noise
if (cvalue >= 1700) { if (cvalue >= 1700) {
cvalue = 2000; cvalue = 2000;
} else if (cvalue <= 1300) { } else if ((cvalue > 800) && (cvalue <= 1300)) {
cvalue = 1300; cvalue = 1300;
} else { } else {
cvalue = 1500; cvalue = 1500;

2
libraries/AP_ICEngine/AP_ICEngine.h

@ -123,7 +123,7 @@ private:
AP_Int16 options; AP_Int16 options;
// start_chan debounce // start_chan debounce
uint16_t start_chan_last_value; uint16_t start_chan_last_value = 1500;
uint32_t start_chan_last_ms; uint32_t start_chan_last_ms;
}; };

Loading…
Cancel
Save