1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

Add exception to allow uploading firmware for 0x402 boards to 0x401 boards

This commit is contained in:
James Cotton 2012-01-24 16:58:56 -06:00
parent 3880b0ddc3
commit 3ab40b713e

View File

@ -378,7 +378,9 @@ void deviceWidget::uploadFirmware()
// - Check whether board type matches firmware:
int board = m_dfu->devices[deviceID].ID;
int firmwareBoard = ((desc.at(12)&0xff)<<8) + (desc.at(13)&0xff);
if (firmwareBoard != board) {
if((board == 0x401 && firmwareBoard == 0x402)) {
// These firmwares are designed to be backwards compatible
} else if (firmwareBoard != board) {
status("Error: firmware does not match board", STATUSICON_FAIL);
myDevice->updateButton->setEnabled(true);
return;