anthonykirby / lora-packet

LoRa radio packet decoder
MIT License
261 stars 83 forks source link

DLSettings read incorrectly for data rate #23

Closed huntc closed 6 years ago

huntc commented 6 years ago

Found a typo: https://github.com/anthonykirby/lora-packet/blob/master/lib/packet.js#L615

Should be:

return (that._packet.DLSettings.readUInt8(0) & constants.DLSETTINGS_RXTWODATARATE_MASK) >> constants.DLSETTINGS_RXTWODATARATE_POS;

i.e. POS and not MASK.

anthonykirby commented 6 years ago

thank you for the fix!