mirror of https://github.com/espruino/BangleApps
btadv: fix GPS encoding
parent
8654f7d56e
commit
9ad799e0f3
|
@ -110,7 +110,7 @@ var drawInfo = function (force) {
|
||||||
if (bar) {
|
if (bar) {
|
||||||
g.drawString("".concat(bar.altitude.toFixed(1), "m"), mid, y);
|
g.drawString("".concat(bar.altitude.toFixed(1), "m"), mid, y);
|
||||||
y += g.getFontHeight();
|
y += g.getFontHeight();
|
||||||
g.drawString("".concat(bar.pressure.toFixed(1), "mbar"), mid, y);
|
g.drawString("".concat(bar.pressure.toFixed(1), " hPa"), mid, y);
|
||||||
y += g.getFontHeight();
|
y += g.getFontHeight();
|
||||||
g.drawString("".concat(bar.temperature.toFixed(1), "C"), mid, y);
|
g.drawString("".concat(bar.temperature.toFixed(1), "C"), mid, y);
|
||||||
y += g.getFontHeight();
|
y += g.getFontHeight();
|
||||||
|
|
|
@ -362,7 +362,7 @@ const encodeHrm: LenFunc<Hrm> = (hrm: Hrm) =>
|
||||||
encodeHrm.maxLen = 2;
|
encodeHrm.maxLen = 2;
|
||||||
|
|
||||||
const encodePressure: LenFunc<PressureData> = (data: PressureData) =>
|
const encodePressure: LenFunc<PressureData> = (data: PressureData) =>
|
||||||
toByteArray(Math.round(data.pressure * 1000), 4, false);
|
toByteArray(Math.round(data.pressure * 10), 4, false);
|
||||||
encodePressure.maxLen = 4;
|
encodePressure.maxLen = 4;
|
||||||
|
|
||||||
const encodeElevation: LenFunc<PressureData> = (data: PressureData) =>
|
const encodeElevation: LenFunc<PressureData> = (data: PressureData) =>
|
||||||
|
@ -370,7 +370,7 @@ const encodeElevation: LenFunc<PressureData> = (data: PressureData) =>
|
||||||
encodeElevation.maxLen = 3;
|
encodeElevation.maxLen = 3;
|
||||||
|
|
||||||
const encodeTemp: LenFunc<PressureData> = (data: PressureData) =>
|
const encodeTemp: LenFunc<PressureData> = (data: PressureData) =>
|
||||||
toByteArray(Math.round(data.temperature * 100), 2, true);
|
toByteArray(Math.round(data.temperature * 10), 2, true);
|
||||||
encodeTemp.maxLen = 2;
|
encodeTemp.maxLen = 2;
|
||||||
|
|
||||||
const encodeGps: LenFunc<GPSFix> = (data: GPSFix) => {
|
const encodeGps: LenFunc<GPSFix> = (data: GPSFix) => {
|
||||||
|
|
Loading…
Reference in New Issue