mirror of https://github.com/espruino/BangleApps
Removed remaining invalid references to Number.isFinite()
parent
eb20a35e0d
commit
1443cc4000
|
@ -1,2 +1,3 @@
|
|||
0.01: New App!
|
||||
0.02: Corrected NaN test for GPS
|
||||
0.03: Removed remaining invalid references to Number.isFinite
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"id": "openlocatebeacon",
|
||||
"name": "OpenLocate Beacon",
|
||||
"shortName": "OpenLocate Beacon",
|
||||
"version": "0.02",
|
||||
"version": "0.03",
|
||||
"description": "Advertise GPS geolocation date using the OpenLocate Beacon packet specification.",
|
||||
"icon": "openlocatebeacon.png",
|
||||
"screenshots": [],
|
||||
|
|
|
@ -42,7 +42,7 @@ function encodeGeoLocationElement() {
|
|||
lci[7] = (rfc6225lon.fraction >> 16) & 0xff;
|
||||
lci[8] = (rfc6225lon.fraction >> 8) & 0xff;
|
||||
lci[9] = rfc6225lon.fraction & 0xff;
|
||||
lci[10] = Number.isFinite(bar.altitude) ? 0x10 : 0x00;
|
||||
lci[10] = bar.altitude ? 0x10 : 0x00;
|
||||
lci[11] = (rfc6225alt.integer >> 16) & 0xff;
|
||||
lci[12] = (rfc6225alt.integer >> 8) & 0xff;
|
||||
lci[13] = rfc6225alt.integer & 0xff;
|
||||
|
@ -73,7 +73,7 @@ function toRfc6225Coordinate(coordinate) {
|
|||
|
||||
// Convert altitude to RFC6225
|
||||
function toRfc6225Altitude(altitude) {
|
||||
if(!Number.isFinite(altitude)) {
|
||||
if(!altitude) {
|
||||
return { integer: 0, fraction: 0 };
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue