mirror of https://github.com/espruino/BangleApps
added error codes to kicthen combo to warn of missing dependancy
parent
d1c31ac498
commit
6a2f47f035
|
@ -3083,7 +3083,7 @@
|
|||
{ "id": "kitchen",
|
||||
"name": "Kitchen Combo",
|
||||
"icon": "kitchen.png",
|
||||
"version":"0.06",
|
||||
"version":"0.07",
|
||||
"description": "Combination of the stepo, walkersclock, arrow and waypointer apps into a multiclock format. 'Everything but the kitchen sink'. Requires firmware v2.08.167 or later",
|
||||
"tags": "tool,outdoors,gps",
|
||||
"type":"clock",
|
||||
|
|
|
@ -4,3 +4,4 @@
|
|||
0.04: Added stopwatch face
|
||||
0.05: Stopwatch, hide hours if 0, fixed flicker when stopped, updated README issues
|
||||
0.06: Reduced memory footprint of compass, used direct screen access rather than arrayBuffer
|
||||
0.07: Added error codes if dependancies are missing
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
# Kitchen Combo - a multiclock format of the waypointer, walksersclock, stepo and arrow apps.
|
||||
# Kitchen Combo - a multiclock format of the waypointer, walkersclock, stepo and arrow apps.
|
||||
|
||||

|
||||
|
||||
*...everything but the kitchen sink..*
|
||||
|
||||
NOTE: This app require Bangle firmware 2.08.187 or later.
|
||||
NOTE: This app requires Bangle firmware 2.08.187 or later.
|
||||
|
||||
The app is aimed at navigation whilst walking. Please note that it
|
||||
would be foolish in the extreme to rely on this as your only
|
||||
|
@ -44,6 +44,7 @@ The following buttons depend on which face is currently in use
|
|||
## Stepo
|
||||

|
||||
|
||||
- Requires one of the pedominter widgets to be installed
|
||||
- Displays the time in large font
|
||||
- Display current step count in a doughnut gauge
|
||||
- Show step count in the middle of the doughnut gauge
|
||||
|
@ -218,11 +219,16 @@ object (g.) for the compass App. This creates a bit of flicker when
|
|||
the arrow moves but is more reliable than using the ArrayBuffer.
|
||||
|
||||
|
||||
### Error Codes
|
||||
|
||||
The following error codes will be displayed if one of the dependancies is not met.
|
||||
|
||||
* E-STEPS - no pedomintor widget has been installed, please install the widpedom or the activepedom widgets
|
||||
* E-CALIB - no compass calibration data was found, see 'Compass Calibration'
|
||||
* E-FW - require firmware 2v08.187 or later to detect gps and compass power status
|
||||
|
||||
### Issues
|
||||
|
||||
* GPS time display shows GMT and not BST, needs localising
|
||||
* Occassional buzzing after 2-3 days of use, seems to disappear after
|
||||
a reset to the launcher menu. Needs investigation
|
||||
* Need to gracefully handle incorrect firmware
|
||||
* Need to gracefully handle missing compass calibration data
|
||||
* Need to gracefully handle missing steps widget
|
||||
|
|
|
@ -175,7 +175,16 @@
|
|||
}
|
||||
|
||||
function draw() {
|
||||
//log_debug("draw()");
|
||||
log_debug("draw()");
|
||||
|
||||
if (CALIBDATA === undefined || CALIBDATA === null) {
|
||||
g.setFontAlign(0,0);
|
||||
g.setColor(1,1,1);
|
||||
g.setFont("Vector", 24);
|
||||
g.drawString("E-CALIB", 120, 120);
|
||||
return
|
||||
}
|
||||
|
||||
var d = tiltfixread(CALIBDATA.offset,CALIBDATA.scale);
|
||||
heading = newHeading(d,heading);
|
||||
// sets bearing to waypoint bearing if GPS on else sets to 0 (north)
|
||||
|
|
|
@ -79,6 +79,12 @@
|
|||
g.setColor(0xFFC0);
|
||||
g.setFontAlign(0, -1);
|
||||
|
||||
if (!checkFirmware(2,8,187)) {
|
||||
g.setColor(1,1,1);
|
||||
g.drawString("E-FW", 120, Y_ACTIVITY);
|
||||
return;
|
||||
}
|
||||
|
||||
if (gpsObject.getState() === gpsObject.GPS_OFF) {
|
||||
g.drawString("GPS off", 120, Y_ACTIVITY);
|
||||
return;
|
||||
|
@ -173,6 +179,18 @@
|
|||
drawGPSData();
|
||||
}
|
||||
|
||||
function checkFirmware(maj,min,bld) {
|
||||
var major = process.env.VERSION.split(".")[0].split("v")[0];
|
||||
var minor = process.env.VERSION.split(".")[0].split("v")[1];
|
||||
var build = process.env.VERSION.split(".")[1];
|
||||
|
||||
if (major > maj) return true;
|
||||
if (major == 2 && minor > min) return true;
|
||||
if (major == 2 && minor == min && build >= bld) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return {init:init, freeResources:freeResources, startTimer:startTimer, stopTimer:stopTimer,
|
||||
onButtonShort:onButtonShort, onButtonLong:onButtonLong};
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
function getSteps() {
|
||||
if (stepsWidget() !== undefined)
|
||||
return stepsWidget().getSteps();
|
||||
return "-";
|
||||
return "E-STEPS";
|
||||
}
|
||||
|
||||
function stepsWidget() {
|
||||
|
|
Loading…
Reference in New Issue