1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-16 21:05:26 +03:00

Re #3043: added Air speed parser

This commit is contained in:
Damjan Adamic 2015-11-12 18:47:27 +01:00
parent 09846ca917
commit ef5746de11

View file

@ -51,12 +51,17 @@ def ParseSWR(packet, dataId, prim, appId, data, crc):
print "packet: %s (%4d)" % (dump(packet), lineNumber) , print "packet: %s (%4d)" % (dump(packet), lineNumber) ,
print " SWR: %d" % (data & 0xFF) print " SWR: %d" % (data & 0xFF)
def ParseAirSpeed(packet, dataId, prim, appId, data, crc):
print "packet: %s (%4d)" % (dump(packet), lineNumber) ,
print " Aspd: %.1f m/s" % (data/10.0)
appIdParsers = ( appIdParsers = (
(0x0300, 0x030f, ParseFlVSS), (0x0300, 0x030f, ParseFlVSS),
(0xf101, 0xf101, ParseRSSI), (0xf101, 0xf101, ParseRSSI),
(0xf102, 0xf103, ParseAdc), (0xf102, 0xf103, ParseAdc),
(0xf104, 0xf104, ParseBatt), (0xf104, 0xf104, ParseBatt),
(0xf105, 0xf105, ParseSWR), (0xf105, 0xf105, ParseSWR),
(0x0a00, 0x0a0f, ParseAirSpeed),
) )
def dump(data, maxLen = None): def dump(data, maxLen = None):