From d081fe1fe9ecf8ce8847704f2cf02141970d2161 Mon Sep 17 00:00:00 2001 From: bkleiner Date: Thu, 26 Sep 2024 14:25:01 +0200 Subject: [PATCH] remove gesture aux --- src/config/config.h | 5 +---- src/flight/gestures.c | 14 -------------- src/flight/gestures.h | 2 -- src/osd/render.c | 25 ++++++++++++------------- src/rx/rx.c | 4 +--- src/rx/rx.h | 1 - 6 files changed, 14 insertions(+), 37 deletions(-) diff --git a/src/config/config.h b/src/config/config.h index 15614e905..16c940a3a 100644 --- a/src/config/config.h +++ b/src/config/config.h @@ -109,9 +109,6 @@ // *************comment out to disable #define FPV_SWITCH AUX_CHANNEL_ON -// *************RRD/LLD stick gesture aux start up state. Gesture aux is AUX_CHANNEL_GESTURE -// #define GESTURE_AUX_START_ON - // *************failsafe time in uS #define FAILSAFE_TIME_US 1000000 #define FAILSAFE_LOCK_TIME_MS 5000 @@ -186,7 +183,7 @@ // *************limits the maxium power applied to the motors #define MOTOR_LIMIT 100.0 -// *************invert yaw pid for "PROPS OUT" configuration - This feature is switchable to "PROPS IN" when active with stick gesture DOWN-UP-DOWN, Save selection with DOWN-DOWN-DOWN +// *************invert yaw pid for "PROPS OUT" configuration #define INVERT_YAW_PID // *************throttle boost - can intensify small throttle imbalances visible in FPV if factor is set too high on brushed or actually rob performance on brushless due to thrust imbalances diff --git a/src/flight/gestures.c b/src/flight/gestures.c index 5c8f73c8d..3fa723807 100644 --- a/src/flight/gestures.c +++ b/src/flight/gestures.c @@ -56,10 +56,6 @@ static const gesture_key_t commands[GESTURE_MAX][GSIZE] = { [GESTURE_DDD] = {GESTURE_CENTER_IDLE, GESTURE_DOWN, GESTURE_CENTER, GESTURE_DOWN, GESTURE_CENTER, GESTURE_DOWN, GESTURE_CENTER}, [GESTURE_UUU] = {GESTURE_CENTER_IDLE, GESTURE_UP, GESTURE_CENTER, GESTURE_UP, GESTURE_CENTER, GESTURE_UP, GESTURE_CENTER}, - // Gesture aux - [GESTURE_LLD] = {GESTURE_CENTER_IDLE, GESTURE_LEFT, GESTURE_CENTER, GESTURE_LEFT, GESTURE_CENTER, GESTURE_DOWN, GESTURE_CENTER}, - [GESTURE_RRD] = {GESTURE_CENTER_IDLE, GESTURE_RIGHT, GESTURE_CENTER, GESTURE_RIGHT, GESTURE_CENTER, GESTURE_DOWN, GESTURE_CENTER}, - // Enter OSD [GESTURE_RRR] = {GESTURE_CENTER_IDLE, GESTURE_RIGHT, GESTURE_CENTER, GESTURE_RIGHT, GESTURE_CENTER, GESTURE_RIGHT, GESTURE_CENTER}, // Refresh OSD @@ -216,16 +212,6 @@ void gestures() { led_flash(); break; } - case GESTURE_RRD: { - state.aux[AUX_CHANNEL_GESTURE] = 1; - led_flash(); - break; - } - case GESTURE_LLD: { - state.aux[AUX_CHANNEL_GESTURE] = 0; - led_flash(); - break; - } case GESTURE_LRL: { while (osd_pop_screen() != OSD_SCREEN_CLEAR) ; diff --git a/src/flight/gestures.h b/src/flight/gestures.h index 9db442d10..b11ccf663 100644 --- a/src/flight/gestures.h +++ b/src/flight/gestures.h @@ -9,8 +9,6 @@ typedef enum { GESTURE_NONE, GESTURE_DDD, GESTURE_UUU, - GESTURE_LLD, - GESTURE_RRD, GESTURE_RRR, GESTURE_LRL, GESTURE_MAX, diff --git a/src/osd/render.c b/src/osd/render.c index 6f691988f..3febc86d1 100644 --- a/src/osd/render.c +++ b/src/osd/render.c @@ -88,7 +88,6 @@ static const char *aux_channel_labels[] = { "CHANNEL 16 ", "ALWAYS OFF ", "ALWAYS ON ", - "GESTURE AUX", }; static const char *on_off_labels[] = { @@ -894,20 +893,20 @@ void osd_display() { { // PAGE 1 osd_menu_select_enum_adjust(4, OSD_AUTO, "ARMING", 17, &profile.receiver.aux[AUX_ARMING], aux_channel_labels, AUX_CHANNEL_0, AUX_CHANNEL_11); - osd_menu_select_enum_adjust(4, OSD_AUTO, "PREARM", 17, &profile.receiver.aux[AUX_PREARM], aux_channel_labels, AUX_CHANNEL_0, AUX_CHANNEL_GESTURE); - osd_menu_select_enum_adjust(4, OSD_AUTO, "IDLE UP", 17, &profile.receiver.aux[AUX_IDLE_UP], aux_channel_labels, AUX_CHANNEL_0, AUX_CHANNEL_GESTURE); - osd_menu_select_enum_adjust(4, OSD_AUTO, "LEVELMODE", 17, &profile.receiver.aux[AUX_LEVELMODE], aux_channel_labels, AUX_CHANNEL_0, AUX_CHANNEL_GESTURE); - osd_menu_select_enum_adjust(4, OSD_AUTO, "RACEMODE", 17, &profile.receiver.aux[AUX_RACEMODE], aux_channel_labels, AUX_CHANNEL_0, AUX_CHANNEL_GESTURE); - osd_menu_select_enum_adjust(4, OSD_AUTO, "HORIZON", 17, &profile.receiver.aux[AUX_HORIZON], aux_channel_labels, AUX_CHANNEL_0, AUX_CHANNEL_GESTURE); - osd_menu_select_enum_adjust(4, OSD_AUTO, "STICK BOOST", 17, &profile.receiver.aux[AUX_STICK_BOOST_PROFILE], aux_channel_labels, AUX_CHANNEL_0, AUX_CHANNEL_GESTURE); + osd_menu_select_enum_adjust(4, OSD_AUTO, "PREARM", 17, &profile.receiver.aux[AUX_PREARM], aux_channel_labels, AUX_CHANNEL_0, AUX_CHANNEL_11); + osd_menu_select_enum_adjust(4, OSD_AUTO, "IDLE UP", 17, &profile.receiver.aux[AUX_IDLE_UP], aux_channel_labels, AUX_CHANNEL_0, AUX_CHANNEL_11); + osd_menu_select_enum_adjust(4, OSD_AUTO, "LEVELMODE", 17, &profile.receiver.aux[AUX_LEVELMODE], aux_channel_labels, AUX_CHANNEL_0, AUX_CHANNEL_11); + osd_menu_select_enum_adjust(4, OSD_AUTO, "RACEMODE", 17, &profile.receiver.aux[AUX_RACEMODE], aux_channel_labels, AUX_CHANNEL_0, AUX_CHANNEL_11); + osd_menu_select_enum_adjust(4, OSD_AUTO, "HORIZON", 17, &profile.receiver.aux[AUX_HORIZON], aux_channel_labels, AUX_CHANNEL_0, AUX_CHANNEL_11); + osd_menu_select_enum_adjust(4, OSD_AUTO, "STICK BOOST", 17, &profile.receiver.aux[AUX_STICK_BOOST_PROFILE], aux_channel_labels, AUX_CHANNEL_0, AUX_CHANNEL_11); // PAGE 2 - osd_menu_select_enum_adjust(4, OSD_AUTO, "RATE", 17, &profile.receiver.aux[AUX_RATE_PROFILE], aux_channel_labels, AUX_CHANNEL_0, AUX_CHANNEL_GESTURE); - osd_menu_select_enum_adjust(4, OSD_AUTO, "BUZZER", 17, &profile.receiver.aux[AUX_BUZZER_ENABLE], aux_channel_labels, AUX_CHANNEL_0, AUX_CHANNEL_GESTURE); - osd_menu_select_enum_adjust(4, OSD_AUTO, "TURTLE", 17, &profile.receiver.aux[AUX_TURTLE], aux_channel_labels, AUX_CHANNEL_0, AUX_CHANNEL_GESTURE); - osd_menu_select_enum_adjust(4, OSD_AUTO, "MOTOR TEST", 17, &profile.receiver.aux[AUX_MOTOR_TEST], aux_channel_labels, AUX_CHANNEL_0, AUX_CHANNEL_GESTURE); - osd_menu_select_enum_adjust(4, OSD_AUTO, "FPV SWITCH", 17, &profile.receiver.aux[AUX_FPV_SWITCH], aux_channel_labels, AUX_CHANNEL_0, AUX_CHANNEL_GESTURE); - osd_menu_select_enum_adjust(4, OSD_AUTO, "BLACKBOX", 17, &profile.receiver.aux[AUX_BLACKBOX], aux_channel_labels, AUX_CHANNEL_0, AUX_CHANNEL_GESTURE); + osd_menu_select_enum_adjust(4, OSD_AUTO, "RATE", 17, &profile.receiver.aux[AUX_RATE_PROFILE], aux_channel_labels, AUX_CHANNEL_0, AUX_CHANNEL_11); + osd_menu_select_enum_adjust(4, OSD_AUTO, "BUZZER", 17, &profile.receiver.aux[AUX_BUZZER_ENABLE], aux_channel_labels, AUX_CHANNEL_0, AUX_CHANNEL_11); + osd_menu_select_enum_adjust(4, OSD_AUTO, "TURTLE", 17, &profile.receiver.aux[AUX_TURTLE], aux_channel_labels, AUX_CHANNEL_0, AUX_CHANNEL_11); + osd_menu_select_enum_adjust(4, OSD_AUTO, "MOTOR TEST", 17, &profile.receiver.aux[AUX_MOTOR_TEST], aux_channel_labels, AUX_CHANNEL_0, AUX_CHANNEL_11); + osd_menu_select_enum_adjust(4, OSD_AUTO, "FPV SWITCH", 17, &profile.receiver.aux[AUX_FPV_SWITCH], aux_channel_labels, AUX_CHANNEL_0, AUX_CHANNEL_11); + osd_menu_select_enum_adjust(4, OSD_AUTO, "BLACKBOX", 17, &profile.receiver.aux[AUX_BLACKBOX], aux_channel_labels, AUX_CHANNEL_0, AUX_CHANNEL_11); } osd_menu_scroll_finish(4); diff --git a/src/rx/rx.c b/src/rx/rx.c index d907d2a36..f33fabb4c 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -123,9 +123,7 @@ static void rx_init_state() { // set always on channel to on state.aux[AUX_CHANNEL_ON] = 1; state.aux[AUX_CHANNEL_OFF] = 0; -#ifdef GESTURE_AUX_START_ON - state.aux[AUX_CHANNEL_GESTURE] = 1; -#endif + filter_lp_pt2_init(&rx_filter, rx_filter_state, 4, state.rx_filter_hz); } diff --git a/src/rx/rx.h b/src/rx/rx.h index 302285a9c..a5998a94e 100644 --- a/src/rx/rx.h +++ b/src/rx/rx.h @@ -52,7 +52,6 @@ typedef enum { AUX_CHANNEL_11, AUX_CHANNEL_OFF, AUX_CHANNEL_ON, - AUX_CHANNEL_GESTURE, AUX_CHANNEL_MAX } __attribute__((__packed__)) aux_channel_t;