Merge branch 'combine-lora-msg' of github.com:ttnkn/ESP32-Paxcounter into combine-lora-msg

This commit is contained in:
nerdyscout 2019-11-21 20:18:18 +00:00
commit 2c0cf88e0b

View File

@ -50,8 +50,12 @@ function Decoder(bytes, port) {
if (port === 4) { if (port === 4) {
// gps data // gps data
if (bytes.length === 8) {
return decode(bytes, [latLng, latLng], ['latitude', 'longitude']);
} else {
return decode(bytes, [latLng, latLng, uint8, hdop, altitude], ['latitude', 'longitude', 'sats', 'hdop', 'altitude']); return decode(bytes, [latLng, latLng, uint8, hdop, altitude], ['latitude', 'longitude', 'sats', 'hdop', 'altitude']);
} }
}
if (port === 5) { if (port === 5) {
// button pressed // button pressed