either the wiki on the DIMU TARE (dIMUTare() )function is wrong, or the code.
Excerpt from 'supervisor.c':
- Code: Select all
#ifdef HAS_DIGITAL_IMU
// leveling function
if (RADIO_THROT < p[CTRL_MIN_THROT] && RADIO_RUDD < -500 && RADIO_ROLL < -500 && RADIO_PITCH > +500) {
#ifdef SUPERVISOR_DEBUG_PORT
digitalHi(supervisorData.debugLed);
#endif
digitalHi(supervisorData.readyLed);
dIMUTare();
AQ_NOTICE("Leveled\n");
...
TARE should be executed with both sticks in the lower left corner. The above will result in the behavior as described here viewtopic.php?f=42&t=3071&start=20#p20172 --> PITCH needs to be up!
So, shouldn't this be changed to
- Code: Select all
#ifdef HAS_DIGITAL_IMU
// leveling function
if (RADIO_THROT < p[CTRL_MIN_THROT] && RADIO_RUDD < -500 && RADIO_ROLL < -500 && RADIO_PITCH < -500) {
#ifdef SUPERVISOR_DEBUG_PORT
digitalHi(supervisorData.debugLed);
#endif
digitalHi(supervisorData.readyLed);
dIMUTare();
AQ_NOTICE("Leveled\n");
...
to make it work as expected?
Joerg
aBUGSworstnightmare
P.S. taken from r372; checked out a few minutes before posting this.