mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-30 19:47:50 +08:00
[system] various update
- flight recorder - configurable power switch init - configurable chibios AP stacks
This commit is contained in:
@@ -36,6 +36,7 @@
|
|||||||
<message name="AIR_DATA" period="1.3"/>
|
<message name="AIR_DATA" period="1.3"/>
|
||||||
<message name="ESC" period="0.9"/>
|
<message name="ESC" period="0.9"/>
|
||||||
<message name="LOGGER_STATUS" period="5.1"/>
|
<message name="LOGGER_STATUS" period="5.1"/>
|
||||||
|
<message name="WIND_INFO_RET" period="0.1"/>
|
||||||
</mode>
|
</mode>
|
||||||
<mode name="minimal">
|
<mode name="minimal">
|
||||||
<message name="ALIVE" period="5"/>
|
<message name="ALIVE" period="5"/>
|
||||||
|
|||||||
@@ -103,7 +103,11 @@ void autopilot_init(void)
|
|||||||
autopilot.power_switch = false;
|
autopilot.power_switch = false;
|
||||||
#ifdef POWER_SWITCH_GPIO
|
#ifdef POWER_SWITCH_GPIO
|
||||||
gpio_setup_output(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
|
#endif
|
||||||
|
|
||||||
// call firmware specific init
|
// call firmware specific init
|
||||||
|
|||||||
@@ -53,18 +53,32 @@
|
|||||||
#include "subsystems/datalink/downlink.h"
|
#include "subsystems/datalink/downlink.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Default autopilot thread stack size
|
||||||
|
*/
|
||||||
|
#ifndef AP_THREAD_STACK_SIZE
|
||||||
|
#define AP_THREAD_STACK_SIZE 8192
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* PPRZ/AP thread
|
* PPRZ/AP thread
|
||||||
*/
|
*/
|
||||||
static void thd_ap(void *arg);
|
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;
|
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
|
* PPRZ/FBW thread
|
||||||
*/
|
*/
|
||||||
static void thd_fbw(void *arg);
|
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;
|
static thread_t *fbwThdPtr = NULL;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user