Corrected pressure resolution

master
jeffyactive 2021-12-17 16:50:23 -05:00
parent 6a1c140883
commit 4aaccb87d5
1 changed files with 1 additions and 1 deletions

View File

@ -132,7 +132,7 @@ function transmitUpdatedSensorData() {
// Encode the bar service data to fit in a Bluetooth PDU
function encodeBarServiceData() {
let t = toByteArray(Math.round(bar.temperature * 100), 2, true);
let p = toByteArray(Math.round(bar.pressure * 100), 4, false);
let p = toByteArray(Math.round(bar.pressure * 10), 4, false);
let e = toByteArray(Math.round(bar.altitude * 100), 3, true);
return [