-
Notifications
You must be signed in to change notification settings - Fork 41
Description
I am not directly using the files in this repository, but we translated some of the logic into another language.
https://github.com/dragino/dragino-end-node-decoder/blob/67d78ac75fca2b08baf08dcd70c1e14d774e675e/LSN50v2-S31%26S31B/Decoder_TTN.txt#L13C1-L14C1
https://github.com/dragino/dragino-end-node-decoder/blob/67d78ac75fca2b08baf08dcd70c1e14d774e675e/S31-LB%26S31B-LB/S31-LB_v1.3_TTN_decoder.txt#L48C1-L49C1
These lines and probably some others decode bytes into a float that represents temperature in °C. However I can not see where it would handle negative numbers. Would one not get 6550 °C or similar for a negative temperature?
Also, I do not see why there is a left shift and then a right shift of the byte (bytes[2]<<24>>16) and not simply only a left shift (bytes[2]<<8).