Skip to content

Commit

Permalink
fix code
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-f committed Jul 3, 2024
1 parent 2dd45e9 commit da3b7cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
13 changes: 6 additions & 7 deletions services/pixljs_alert/pixljs_ble.js
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 0 additions & 2 deletions services/pixljs_alert/zero_ble.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand Down

0 comments on commit da3b7cd

Please sign in to comment.