Merge pull request #3803 from bobrippling/fix/bikespeedo-graphics

Fix bikespeedo inconsistent rendering
master
thyttan 2025-04-20 17:42:53 +02:00 committed by GitHub
commit 72b97bc54c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 12 deletions

View File

@ -5,3 +5,4 @@
0.05: Allow toggling of "max" values (screen tap) and recording (button press)
0.06: Fix local unit setting
0.07: Minor code improvements
0.08: Ensure graphics state is reset at the start of a draw (such as if a widget has altered state)

View File

@ -196,7 +196,7 @@ var emulator = (process.env.BOARD=="EMSCRIPTEN" || process.env.BOARD=="EMSCRIPTE
var SATinView = 0;
function drawFix(dat) {
g.clearRect(0,screenYstart,screenW,screenH);
g.reset().clearRect(0,screenYstart,screenW,screenH);
var v = '';
var u='';
@ -234,7 +234,6 @@ function drawFix(dat) {
drawSats('View:' + SATinView);
}
}
g.reset();
}
@ -404,8 +403,8 @@ function onGPS(fix) {
}
function updateClock() {
drawTime();
g.reset();
drawTime();
if ( emulator ) {
max.spd++; max.alt++;
@ -499,7 +498,7 @@ function nextMode() {
function start() {
Bangle.setBarometerPower(1); // needs some time...
g.clearRect(0,screenYstart,screenW,screenH);
g.reset().clearRect(0,screenYstart,screenW,screenH);
onGPS(lf);
Bangle.setGPSPower(1);
Bangle.on('GPS', onGPS);

View File

@ -2,7 +2,7 @@
"id": "bikespeedo",
"name": "Bike Speedometer (beta)",
"shortName": "Bike Speedometer",
"version": "0.07",
"version": "0.08",
"description": "Shows GPS speed, GPS heading, Compass heading, GPS altitude and Barometer altitude from internal sources",
"icon": "app.png",
"screenshots": [{"url":"Screenshot.png"}],