mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-17 02:52:12 +01:00
OP-21/Bootloader - Change HW ID to 16bits. Should still be compatible with the old version.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2398 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
5bf8adb12a
commit
1f89ee1865
@ -37,7 +37,7 @@ typedef struct
|
||||
uint32_t sizeOfCode;
|
||||
uint8_t sizeOfDescription;
|
||||
uint8_t BL_Version;
|
||||
uint8_t devID;
|
||||
uint16_t devID;
|
||||
DeviceType devType;
|
||||
uint32_t FW_Crc;
|
||||
}Device;
|
||||
|
@ -364,6 +364,8 @@ void processComand(uint8_t *xReceive_Buffer) {
|
||||
Buffer[11] = devicesTable[Data0 - 1].FW_Crc >> 16;
|
||||
Buffer[12] = devicesTable[Data0 - 1].FW_Crc >> 8;
|
||||
Buffer[13] = devicesTable[Data0 - 1].FW_Crc;
|
||||
Buffer[14] = devicesTable[Data0 - 1].devID>>8;
|
||||
Buffer[15] = devicesTable[Data0 - 1].devID;
|
||||
}
|
||||
sendData(Buffer + 1, 63);
|
||||
//PIOS_COM_SendBuffer(PIOS_COM_TELEM_USB, Buffer + 1, 63);//FIX+1
|
||||
|
@ -122,7 +122,7 @@ struct opahrs_msg_v0_rsp_fwdn_data {
|
||||
} __attribute__ ((__packed__));
|
||||
|
||||
struct opahrs_msg_v0_rsp_versions {
|
||||
uint8_t hw_version;
|
||||
uint16_t hw_version;
|
||||
uint16_t bl_version;
|
||||
uint32_t fw_crc;
|
||||
} __attribute__ ((__packed__));
|
||||
|
@ -501,7 +501,9 @@ bool OP_DFU::findDevices()
|
||||
buf[9] = 0;
|
||||
int result = sendData(buf, BUF_LEN);
|
||||
result = receiveData(buf,BUF_LEN);
|
||||
devices[x].ID=buf[9];
|
||||
// devices[x].ID=buf[9];
|
||||
devices[x].ID=buf[14];
|
||||
devices[x].ID=devices[x].ID<<8 | (quint8)buf[15];
|
||||
devices[x].BL_Version=buf[7];
|
||||
devices[x].SizeOfDesc=buf[8];
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<description>Firmware IAP</description>
|
||||
<field name="Command" units="na" type="uint16" elements="1"/>
|
||||
<field name="Description" units="na" type="uint8" elements="100"/>
|
||||
<field name="HWVersion" units="na" type="uint8" elements="1"/>
|
||||
<field name="HWVersion" units="na" type="uint16" elements="1"/>
|
||||
<field name="Target" units="na" type="uint8" elements="1"/>
|
||||
<field name="ArmReset" units="na" type="uint8" elements="1"/>
|
||||
<field name="crc" units="na" type="uint32" elements="1"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user