mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-06 16:49:51 +08:00
Use the PX4IO_FW_SEARCH_PATHS to set path for PX4IO FW update
This commit is contained in:
committed by
Lorenz Meier
parent
daba952ba9
commit
e3698e6853
@@ -3706,29 +3706,15 @@ px4io_main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
PX4IO_Uploader *up;
|
||||
const char *fn[4];
|
||||
|
||||
/* work out what we're uploading... */
|
||||
/* Assume we are using default paths */
|
||||
|
||||
const char *fn[4] = PX4IO_FW_SEARCH_PATHS;
|
||||
|
||||
/* Override defaults if a path is passed on command line */
|
||||
if (argc > 2) {
|
||||
fn[0] = argv[2];
|
||||
fn[1] = nullptr;
|
||||
|
||||
} else {
|
||||
#if defined(CONFIG_ARCH_BOARD_PX4FMU_V1)
|
||||
fn[0] = "/etc/extras/px4io-v1.bin";
|
||||
fn[1] = "/fs/microsd/px4io1.bin";
|
||||
fn[2] = "/fs/microsd/px4io.bin";
|
||||
fn[3] = nullptr;
|
||||
#elif defined(CONFIG_ARCH_BOARD_PX4FMU_V2) || \
|
||||
defined(CONFIG_ARCH_BOARD_AUAV_X21) || \
|
||||
defined(CONFIG_ARCH_BOARD_PX4FMU_V4PRO)
|
||||
fn[0] = "/etc/extras/px4io-v2.bin";
|
||||
fn[1] = "/fs/microsd/px4io2.bin";
|
||||
fn[2] = "/fs/microsd/px4io.bin";
|
||||
fn[3] = nullptr;
|
||||
#else
|
||||
#error "unknown board"
|
||||
#endif
|
||||
}
|
||||
|
||||
up = new PX4IO_Uploader;
|
||||
|
||||
Reference in New Issue
Block a user