mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-30 15:52:12 +01:00
LP-72 allow others who have old b01 sparky2 ID to upgrade without using SBL
This commit is contained in:
parent
c54b88d0f0
commit
4ee65d26f8
@ -78,9 +78,16 @@ int main()
|
||||
struct pios_board_info *new_board_info_blob = (struct pios_board_info *)((uint32_t)embedded_image_start + board_info_blob_offset);
|
||||
|
||||
/* Compare the two board info blobs to make sure they're for the same HW revision */
|
||||
if ((pios_board_info_blob.magic != new_board_info_blob->magic) ||
|
||||
(pios_board_info_blob.board_type != new_board_info_blob->board_type) ||
|
||||
(pios_board_info_blob.board_rev != new_board_info_blob->board_rev)) {
|
||||
if ((pios_board_info_blob.magic != new_board_info_blob->magic)
|
||||
#if PIOS_USB_BOARD_PRODUCT_ID == USB_PRODUCT_ID_SPARKY2
|
||||
|| (((pios_board_info_blob.board_type != new_board_info_blob->board_type)
|
||||
|| (pios_board_info_blob.board_rev != new_board_info_blob->board_rev))
|
||||
&& ((pios_board_info_blob.board_type != 0x0b) || (pios_board_info_blob.board_rev != 0x01)))
|
||||
#else
|
||||
|| (pios_board_info_blob.board_type != new_board_info_blob->board_type)
|
||||
|| (pios_board_info_blob.board_rev != new_board_info_blob->board_rev)
|
||||
#endif
|
||||
) {
|
||||
error(PIOS_LED_HEARTBEAT, 2);
|
||||
}
|
||||
|
||||
|
@ -374,7 +374,8 @@ void DeviceWidget::uploadFirmware()
|
||||
int firmwareBoard = ((quint16)(quint8)desc.at(12) << 8) + (quint16)(quint8)desc.at(13);
|
||||
if ((board == 0x0401 && firmwareBoard == 0x0402) ||
|
||||
(board == 0x0901 && firmwareBoard == 0x0902) || // L3GD20 revo supports Revolution firmware
|
||||
(board == 0x0902 && firmwareBoard == 0x0903)) { // RevoMini1 supported by RevoMini2 firmware
|
||||
(board == 0x0902 && firmwareBoard == 0x0903) || // RevoMini1 supported by RevoMini2 firmware
|
||||
(board == 0x0b01 && firmwareBoard == 0x9201)) { // Sparky2 before and after TL BL compatibility change
|
||||
// These firmwares are designed to be backwards compatible
|
||||
} else if (firmwareBoard != board) {
|
||||
char buf[100];
|
||||
|
Loading…
x
Reference in New Issue
Block a user