mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 07:03:33 +08:00
Use the BOARD_USES_PX4IO_VERSION to set an overridable FW search path
1) Key the exsitance of the PX4IO HW based on BOARD_USES_PX4IO_VERSION
2) Set default PX4IO_FW_SEARCH_PATHS based on verions of the PXPIO HW
3) allow PX4IO_FW_SEARCH_PATHS to be overwritten if a board provides
BOARD_PX4IO_FW_SEARCH_PATHS
This commit is contained in:
committed by
Lorenz Meier
parent
7b4f048ca3
commit
daba952ba9
@@ -165,11 +165,23 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Conditional use of PX4 PIO is Used to determine if the board
|
/* Conditional use of PX4 PIO is Used to determine if the board
|
||||||
* has a PX4PIO processor.
|
* has a PX4IO processor.
|
||||||
* We then publish the logical BOARD_USES_PX4PIO
|
* We then publish the logical BOARD_USES_PX4IO
|
||||||
*/
|
*/
|
||||||
#if defined(PX4IO_SERIAL_DEVICE)
|
#if defined(BOARD_USES_PX4IO_VERSION)
|
||||||
# define BOARD_USES_PX4PIO 1
|
# define BOARD_USES_PX4IO 1
|
||||||
|
/* Allow a board_config to override the PX4IO FW search paths */
|
||||||
|
# if defined(BOARD_PX4IO_FW_SEARCH_PATHS)
|
||||||
|
# define PX4IO_FW_SEARCH_PATHS BOARD_PX4IO_FW_SEARCH_PATHS
|
||||||
|
# else
|
||||||
|
/* Use PX4IO FW search paths defaults based on version */
|
||||||
|
# if BOARD_USES_PX4IO_VERSION == 1
|
||||||
|
# define PX4IO_FW_SEARCH_PATHS {"/etc/extras/px4io-v1.bin", "/fs/microsd/px4io1.bin", "/fs/microsd/px4io.bin", nullptr }
|
||||||
|
# endif
|
||||||
|
# if BOARD_USES_PX4IO_VERSION == 2
|
||||||
|
# define PX4IO_FW_SEARCH_PATHS {"/etc/extras/px4io-v2.bin", "/fs/microsd/px4io2.bin", "/fs/microsd/px4io.bin", nullptr }
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
|
|||||||
Reference in New Issue
Block a user