1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-25 17:25:18 +03:00

Initial cut on servo autotrim feature

This commit is contained in:
Konstantin Sharlaimov (DigitalEntity) 2016-12-07 00:28:27 +10:00
parent e9ce0e30c2
commit 8ac1ace505
5 changed files with 73 additions and 2 deletions

View file

@ -138,6 +138,7 @@ static const box_t boxes[CHECKBOX_ITEM_COUNT + 1] = {
{ BOXFLAPERON, "FLAPERON;", 34 },
{ BOXTURNASSIST, "TURN ASSIST;", 35 },
{ BOXNAVLAUNCH, "NAV LAUNCH;", 36 },
{ BOXAUTOTRIM, "SERVO AUTOTRIM;", 37 },
{ CHECKBOX_ITEM_COUNT, NULL, 0xFF }
};
@ -289,6 +290,7 @@ static void initActiveBoxIds(void)
if (isFixedWing) {
activeBoxIds[activeBoxIdCount++] = BOXPASSTHRU;
activeBoxIds[activeBoxIdCount++] = BOXNAVLAUNCH;
activeBoxIds[activeBoxIdCount++] = BOXAUTOTRIM;
}
/*
@ -358,6 +360,7 @@ static uint32_t packFlightModeFlags(void)
IS_ENABLED(FLIGHT_MODE(FLAPERON)) << BOXFLAPERON |
IS_ENABLED(FLIGHT_MODE(TURN_ASSISTANT)) << BOXTURNASSIST |
IS_ENABLED(FLIGHT_MODE(NAV_LAUNCH_MODE)) << BOXNAVLAUNCH |
IS_ENABLED(IS_RC_MODE_ACTIVE(BOXAUTOTRIM)) << BOXAUTOTRIM |
IS_ENABLED(IS_RC_MODE_ACTIVE(BOXHOMERESET)) << BOXHOMERESET;
uint32_t ret = 0;