mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-27 16:54:15 +01:00
Allow firmware compiled for 0x902 to be downloaded to 0x901
This commit is contained in:
parent
1eaf6f66fb
commit
6cb3abec80
@ -378,7 +378,8 @@ void deviceWidget::uploadFirmware()
|
|||||||
// - Check whether board type matches firmware:
|
// - Check whether board type matches firmware:
|
||||||
int board = m_dfu->devices[deviceID].ID;
|
int board = m_dfu->devices[deviceID].ID;
|
||||||
int firmwareBoard = ((desc.at(12)&0xff)<<8) + (desc.at(13)&0xff);
|
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
|
// These firmwares are designed to be backwards compatible
|
||||||
} else if (firmwareBoard != board) {
|
} else if (firmwareBoard != board) {
|
||||||
status("Error: firmware does not match board", STATUSICON_FAIL);
|
status("Error: firmware does not match board", STATUSICON_FAIL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user