Removed GPS(0,0)

This commit is contained in:
Kevin 2023-06-29 11:45:47 +07:00
parent d6752623b3
commit affe1c724a
1 changed files with 52 additions and 36 deletions

View File

@ -70,9 +70,14 @@ var bytes = input.bytes;
{
var decode = {};
if(latitude !== 0 && longitude !==0)
{
decode.Location=location
decode.Latitude=latitude
decode.Longitud=longitude
}
decode.Hum=hum
decode.Tem=tem
decode.ALARM_status=alarm
@ -116,9 +121,14 @@ var bytes = input.bytes;
intwk = (bytes[10] & 0x10)?"MOVE":"STILL";
{
var decode = {};
if(latitude !== 0 && longitude !==0)
{
decode.Location=location
decode.Latitude=latitude
decode.Longitud=longitude
}
decode.BatV=batV
decode.ALARM_status=alarm
decode.MD=mod
@ -155,8 +165,14 @@ case 4:
date = year+':'+Month+":"+day;
time = hour+":"+min+":"+sen;
if(latitude !== 0 && longitude !==0)
{
decode.Location=location
decode.Latitude=latitude
decode.Longitud=longitude
}
decode.Date=date
decode.Time=time
return {