Update app.js

pull/3038/head
th10111 2023-09-10 20:32:17 +01:00 committed by GitHub
parent f4cd093fb0
commit 2697c544f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 9 deletions

View File

@ -207,21 +207,21 @@ WIDGETS["widTyreid"]={
width: 24, // width of the widget width: 24, // width of the widget
draw: function() { draw: function() {
let disp_dev_val = "-"; let disp_dev_val = "-";
g.reset(); // reset the graphics context to defaults (color/font/etc)
if (gpsFix_flag == 1) {
g.setColor(0,1,0); // green
} else {
g.setColor(1,0,0); // red
}
if (num_bt_devices < 99) { if (num_bt_devices < 99) {
disp_dev_val = num_bt_devices.toString(); disp_dev_val = num_bt_devices.toString();
} else { } else {
disp_dev_val = "99+"; disp_dev_val = "99+";
} }
g.setFont("6x8",3); g.setFont("6x8",3);
g.drawString(disp_dev_val, this.x+24/2, this.y); if (gpsFix_flag == 1) {
g.setColor(0,1,0).drawString(disp_dev_val, this.x+24/2, this.y); // green
} else {
g.setColor(1,0,0).drawString(disp_dev_val, this.x+24/2, this.y); // red
} }
}; }
};
let init_menu = { let init_menu = {