0.06: Ensure widget update itself (fix #118) and change to using icons
parent
57ceb1f35b
commit
b4a24b34d0
|
|
@ -250,7 +250,7 @@
|
||||||
{ "id": "gpsrec",
|
{ "id": "gpsrec",
|
||||||
"name": "GPS Recorder",
|
"name": "GPS Recorder",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"version":"0.05",
|
"version":"0.06",
|
||||||
"interface": "interface.html",
|
"interface": "interface.html",
|
||||||
"description": "Application that allows you to record a GPS track. Can run in background",
|
"description": "Application that allows you to record a GPS track. Can run in background",
|
||||||
"tags": "tool,outdoors,gps,widget",
|
"tags": "tool,outdoors,gps,widget",
|
||||||
|
|
|
||||||
|
|
@ -3,3 +3,4 @@
|
||||||
0.03: Fix GPS time display in gpsrec app
|
0.03: Fix GPS time display in gpsrec app
|
||||||
0.04: Properly Fix GPS time display in gpsrec app
|
0.04: Properly Fix GPS time display in gpsrec app
|
||||||
0.05: Tweaks for variable size widget system
|
0.05: Tweaks for variable size widget system
|
||||||
|
0.06: Ensure widget update itself (fix #118) and change to using icons
|
||||||
|
|
|
||||||
|
|
@ -9,27 +9,21 @@
|
||||||
function draw() {
|
function draw() {
|
||||||
if (!settings.recording) return;
|
if (!settings.recording) return;
|
||||||
g.reset();
|
g.reset();
|
||||||
g.setFont("4x6");
|
g.drawImage(atob("GBgCAAAAAAAAAAQAAAAAAD8AAAAAAP/AAAAAAP/wAAAAAH/8C9AAAB/8L/QAAAfwv/wAAAHS//wAAAAL//gAAAAf/+AAAAAf/4AAAAL//gAAAAD/+DwAAAB/Uf8AAAAfA//AAAACAf/wAAAAAH/0AAAAAB/wAAAAAAfAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"),this.x,this.y);
|
||||||
g.setFontAlign(0,0);
|
|
||||||
g.clearRect(this.x,this.y,this.x+23,this.y+23);
|
|
||||||
g.setColor("#ff0000");
|
|
||||||
if (hasFix) {
|
if (hasFix) {
|
||||||
if (fixToggle) {
|
g.setColor("#FF0000");
|
||||||
g.fillCircle(this.x+11,this.y+11,9);
|
g.drawImage(fixToggle ? atob("CgoCAAAAA0AAOAAD5AAPwAAAAAAAAAAAAAAAAA==") : atob("CgoCAAABw0AcOAHj5A8PwHwAAvgAB/wABUAAAA=="),this.x,this.y+14);
|
||||||
g.setColor("#000000");
|
|
||||||
} else
|
|
||||||
g.drawCircle(this.x+11,this.y+11,9);
|
|
||||||
} else {
|
} else {
|
||||||
g.drawString("NO",this.x+12,this.y+5);
|
g.setColor("#0000FF");
|
||||||
g.drawString("FIX",this.x+12,this.y+19);
|
if (fixToggle)
|
||||||
|
g.setFont("6x8").drawString("?",this.x,this.y+14);
|
||||||
}
|
}
|
||||||
g.drawString("GPS",this.x+12,this.y+12);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onGPS(fix) {
|
function onGPS(fix) {
|
||||||
hasFix = fix.fix;
|
hasFix = fix.fix;
|
||||||
fixToggle = !fixToggle;
|
fixToggle = !fixToggle;
|
||||||
draw();
|
WIDGETS["gpsrec"].draw();
|
||||||
if (hasFix) {
|
if (hasFix) {
|
||||||
periodCtr--;
|
periodCtr--;
|
||||||
if (periodCtr<=0) {
|
if (periodCtr<=0) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue