mirror of https://github.com/ArduPilot/ardupilot
AP_BoardConfig: add ability to change dshot firmware
This commit is contained in:
parent
6d4b5cfc1b
commit
b8af6da623
|
@ -358,6 +358,16 @@ const AP_Param::GroupInfo AP_BoardConfig::var_info[] = {
|
|||
// index 26 used by SER3_RTSCTS
|
||||
// index 27 used by SER4_RTSCTS
|
||||
|
||||
|
||||
#if HAL_WITH_IO_MCU
|
||||
// @Param: IO_DSHOT
|
||||
// @DisplayName: Load DShot FW on IO
|
||||
// @Description: This loads the DShot firmware on the IO co-processor
|
||||
// @Values: 0:StandardFW,1:DshotFW
|
||||
// @RebootRequired: True
|
||||
// @User: Advanced
|
||||
AP_GROUPINFO("IO_DSHOT", 25, AP_BoardConfig, state.io_dshot, 0),
|
||||
#endif
|
||||
AP_GROUPEND
|
||||
};
|
||||
|
||||
|
|
|
@ -92,6 +92,14 @@ public:
|
|||
#endif
|
||||
}
|
||||
|
||||
static bool io_dshot(void) {
|
||||
#if HAL_WITH_IO_MCU
|
||||
return _singleton?_singleton->state.io_dshot.get():false;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
// get alternative config selection
|
||||
uint8_t get_alt_config(void) {
|
||||
return uint8_t(_alt_config.get());
|
||||
|
@ -218,6 +226,7 @@ private:
|
|||
#endif
|
||||
AP_Int8 board_type;
|
||||
AP_Int8 io_enable;
|
||||
AP_Int8 io_dshot;
|
||||
} state;
|
||||
|
||||
#if AP_SDCARD_STORAGE_ENABLED
|
||||
|
|
Loading…
Reference in New Issue