Skip to content

Commit

Permalink
update some old variable names for autopilot mode
Browse files Browse the repository at this point in the history
  • Loading branch information
gautierhattenberger committed Apr 19, 2017
1 parent e38f45e commit 6b1e893
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sw/airborne/modules/switching/auto1_commands.c
Expand Up @@ -28,7 +28,7 @@
void periodic_auto1_commands(void)
{
// Copy Radio commands in AUTO1
if (pprz_mode == AP_MODE_AUTO1) {
if (autopilot_get_mode() == AP_MODE_AUTO1) {
#ifdef COMMAND_HATCH
#ifndef RADIO_HATCH
#error auto1_commands COMMAND_HATCH needs RADIO_HATCH channel
Expand Down
2 changes: 1 addition & 1 deletion sw/misc/rctx/main_rctx.c
Expand Up @@ -177,7 +177,7 @@ void event_task_rctx( void) {
#ifdef USE_RCTX_MODE_SWITCH
// TODO: set rxtx_mode from GPIO connected switch (e.g. I2C pins)
#else
rctx_mode = PPRZ_MODE_OF_PULSE(rc_values[RADIO_MODE], 0) & 3;
rctx_mode = AP_MODE_OF_PULSE(rc_values[RADIO_MODE], 0) & 3;
#endif

rctx_mode |= rctx_under_voltage << 2;
Expand Down
2 changes: 1 addition & 1 deletion sw/tools/generators/gen_settings.ml
Expand Up @@ -268,7 +268,7 @@ let parse_rc_setting = fun xml ->


let parse_rc_mode = fun xml ->
lprintf "if (pprz_mode == PPRZ_MODE_%s) { \\\n" (ExtXml.attrib xml "name");
lprintf "if (autopilot_get_mode() == AP_MODE_%s) { \\\n" (ExtXml.attrib xml "name");
right ();
List.iter parse_rc_setting (Xml.children xml);
left (); lprintf "} \\\n"
Expand Down

0 comments on commit 6b1e893

Please sign in to comment.