1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

Allow firmware compiled for 0x902 to be downloaded to 0x901

This commit is contained in:
James Cotton 2012-03-22 00:28:23 -05:00
parent 1eaf6f66fb
commit 6cb3abec80

View File

@ -378,7 +378,8 @@ 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((board == 0x401 && firmwareBoard == 0x402)) {
if((board == 0x401 && firmwareBoard == 0x402) ||
(board == 0x901 && firmwareBoard == 0x902)) {
// These firmwares are designed to be backwards compatible
} else if (firmwareBoard != board) {
status("Error: firmware does not match board", STATUSICON_FAIL);