Ported from master to next:

#1489: TRACE() output intercepted and shown in Companion (shortcut F6)
#1270: simple Trainer Simulator (shortcut F5)
#1466: telemetry simulator (shorcut F5)
This commit is contained in:
Damjan Adamic
2015-01-04 20:07:39 +01:00
parent a2dc0040b0
commit bb921a0a7f
39 changed files with 865 additions and 96 deletions
+3
View File
@@ -88,6 +88,7 @@ bool checkSportPacket(uint8_t *packet)
crc += crc >> 8; // 0-1FF
crc &= 0x00ff; // 0-FF
}
// TRACE("crc: 0x%02x", crc);
return (crc == 0x00ff);
}
@@ -103,6 +104,8 @@ void processSportPacket(uint8_t *packet)
uint16_t appId = *((uint16_t *)(packet+2));
if (!checkSportPacket(packet)) {
TRACE("processSportPacket(): checksumm error ");
DUMP(packet, FRSKY_SPORT_PACKET_SIZE);
return;
}