diff --git a/services/pixljs_alert/pixljs_ble.js b/services/pixljs_alert/pixljs_ble.js index b45a4d8..c91a657 100644 --- a/services/pixljs_alert/pixljs_ble.js +++ b/services/pixljs_alert/pixljs_ble.js @@ -1,5 +1,5 @@ // force timezone to UTC+0200 -const CODE_VERSION=3; +const CODE_VERSION=4; E.setTimeZone(2); const BUZZING_TIME = 60000; // buzzer time ms const RESET_NO_ANSWER = 60000; @@ -196,16 +196,15 @@ function installScreen() { if (mode == 1) { g.clear(); g.setFontAlign(0.5, -1); - let text = "Installation mode\nPixl.js " + NRF.getAddress().substr(12, 5).replace(":", ""); - g.drawString(text, g.getWidth() / 2, 0); + let text = "Installation mode\nPixl.js " + NRF.getAddress().substr(12, 5).replace(":", "")+"\n"; let diff = Date().valueOf() - lastSeen.valueOf(); if (diff > TIMEOUT_RPI) { - text = "No Rpi Connection"; + text += "No Rpi Connection\n"; } else { - text = "Vu il y a " + parseInt(diff / 1000) + " secondes\nRSSI: " + rssi + " dB (" + rssiPowerHint() + ")"; + text += "Vu il y a " + parseInt(diff / 1000) + " secondes\nRSSI: " + rssi + " dB (" + rssiPowerHint() + ")\n"; } - g.setFontAlign(0.5, 0.5); - g.drawString(text, g.getWidth() / 2 , g.getHeight() / 2); + text+=rpi_status + g.drawString(text, g.getWidth() / 2, 0); g.flip(); setTimeout(installScreen, 500); } else { diff --git a/services/pixljs_alert/zero_ble.py b/services/pixljs_alert/zero_ble.py index d262601..aedae1a 100644 --- a/services/pixljs_alert/zero_ble.py +++ b/services/pixljs_alert/zero_ble.py @@ -103,8 +103,6 @@ def get_rpi_status(): rpi_status = "Mic: %s\nVpn: %s\nBat: %s\nGps: %s" % (mic, vpn, battery, gpdsdout) return rpi_status -print(get_rpi_status()) - class BleTrackingDaemon: known_devices = {}