diff --git a/conf/telemetry/fixedwing_flight_recorder.xml b/conf/telemetry/fixedwing_flight_recorder.xml index 3209f2bc1d..692cee3fec 100644 --- a/conf/telemetry/fixedwing_flight_recorder.xml +++ b/conf/telemetry/fixedwing_flight_recorder.xml @@ -36,6 +36,7 @@ + diff --git a/sw/airborne/autopilot.c b/sw/airborne/autopilot.c index 5a5dafc618..a8cc0bdafa 100644 --- a/sw/airborne/autopilot.c +++ b/sw/airborne/autopilot.c @@ -103,7 +103,11 @@ void autopilot_init(void) autopilot.power_switch = false; #ifdef POWER_SWITCH_GPIO gpio_setup_output(POWER_SWITCH_GPIO); - gpio_clear(POWER_SWITCH_GPIO); // POWER OFF +#ifdef POWER_SWITCH_ENABLE + autopilot_set_power_switch(POWER_SWITCH_ENABLE); // set initial status +#else + gpio_clear(POWER_SWITCH_GPIO); // by default POWER OFF +#endif #endif // call firmware specific init diff --git a/sw/airborne/firmwares/fixedwing/main_chibios.c b/sw/airborne/firmwares/fixedwing/main_chibios.c index d27aaa8cde..3f6e507d54 100644 --- a/sw/airborne/firmwares/fixedwing/main_chibios.c +++ b/sw/airborne/firmwares/fixedwing/main_chibios.c @@ -53,18 +53,32 @@ #include "subsystems/datalink/downlink.h" #endif +/* + * Default autopilot thread stack size + */ +#ifndef AP_THREAD_STACK_SIZE +#define AP_THREAD_STACK_SIZE 8192 +#endif + /* * PPRZ/AP thread */ static void thd_ap(void *arg); -static THD_WORKING_AREA(wa_thd_ap, 8192); +static THD_WORKING_AREA(wa_thd_ap, AP_THREAD_STACK_SIZE); static thread_t *apThdPtr = NULL; +/* + * Default FBW thread stack size + */ +#ifndef FBW_THREAD_STACK_SIZE +#define FBW_THREAD_STACK_SIZE 1024 +#endif + /* * PPRZ/FBW thread */ static void thd_fbw(void *arg); -static THD_WORKING_AREA(wa_thd_fbw, 1024); +static THD_WORKING_AREA(wa_thd_fbw, FBW_THREAD_STACK_SIZE); static thread_t *fbwThdPtr = NULL; /**