Skip to content

Commit

Permalink
AP_Vehicle: wipe iofirmware before serialmanager is iomcu is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
bugobliterator committed Jan 30, 2025
1 parent 027a364 commit d8a852b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions libraries/AP_Vehicle/AP_Vehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,15 @@ void AP_Vehicle::setup()
#endif

#if AP_SERIALMANAGER_ENABLED
#if HAL_WITH_IO_MCU && (HAL_UART_IOMCU_IDX < HAL_UART_NUM_SERIAL_PORTS)
if (BoardConfig.io_enabled()) {
// If IO is enabled, we need to set the protocol to None
// as the IO MCU UART is handled by the AP_IOMCU class
serial_manager.set_protocol_and_baud(HAL_UART_IOMCU_IDX, AP_SerialManager::SerialProtocol_None, 0);
} else {
iomcu.wipe();
}
#endif
// initialise serial ports
serial_manager.init();
#endif
Expand Down

0 comments on commit d8a852b

Please sign in to comment.