Skip to content

Commit

Permalink
remove gesture aux
Browse files Browse the repository at this point in the history
  • Loading branch information
bkleiner committed Oct 20, 2024
1 parent 631976c commit d081fe1
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 37 deletions.
5 changes: 1 addition & 4 deletions src/config/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
14 changes: 0 additions & 14 deletions src/flight/gestures.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
;
Expand Down
2 changes: 0 additions & 2 deletions src/flight/gestures.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ typedef enum {
GESTURE_NONE,
GESTURE_DDD,
GESTURE_UUU,
GESTURE_LLD,
GESTURE_RRD,
GESTURE_RRR,
GESTURE_LRL,
GESTURE_MAX,
Expand Down
25 changes: 12 additions & 13 deletions src/osd/render.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ static const char *aux_channel_labels[] = {
"CHANNEL 16 ",
"ALWAYS OFF ",
"ALWAYS ON ",
"GESTURE AUX",
};

static const char *on_off_labels[] = {
Expand Down Expand Up @@ -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);

Expand Down
4 changes: 1 addition & 3 deletions src/rx/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
1 change: 0 additions & 1 deletion src/rx/rx.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d081fe1

Please sign in to comment.