diff --git a/src/drivers/px4io/px4io.cpp b/src/drivers/px4io/px4io.cpp index 739adc0f26..92ee3fa799 100644 --- a/src/drivers/px4io/px4io.cpp +++ b/src/drivers/px4io/px4io.cpp @@ -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;