mirror of https://github.com/espruino/BangleApps
Update Rocket Sequences Scope to not use memory all time
parent
b3f1e8afb7
commit
647d4b290f
|
@ -5,3 +5,4 @@
|
||||||
0.4: Clear Old Time on Screen Before Draw new Time
|
0.4: Clear Old Time on Screen Before Draw new Time
|
||||||
0.5: Update Date and Time to use Native date Funcions
|
0.5: Update Date and Time to use Native date Funcions
|
||||||
0.6: Add Settings Page
|
0.6: Add Settings Page
|
||||||
|
0.7: Update Rocket Sequences Scope to not use memory all time
|
|
@ -30,6 +30,37 @@ let background = require("heatshrink").decompress(
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let rocket_sequence = 1;
|
||||||
|
|
||||||
|
let settings = require('Storage').readJSON("cassioWatch.settings.json", true) || {};
|
||||||
|
let rocketSpeed = settings.rocketSpeed || 700;
|
||||||
|
delete settings;
|
||||||
|
|
||||||
|
g.clear();
|
||||||
|
|
||||||
|
function DrawClock() {
|
||||||
|
g.setFont("7x11Numeric7Seg", 3);
|
||||||
|
g.clearRect(80, 57, 170, 96);
|
||||||
|
g.setColor(0, 255, 255);
|
||||||
|
g.drawRect(80, 57, 170, 96);
|
||||||
|
g.fillRect(80, 57, 170, 96);
|
||||||
|
g.setColor(0, 0, 0);
|
||||||
|
g.drawString(require("locale").time(new Date(), 1), 70, 60);
|
||||||
|
g.setFont("8x12", 2);
|
||||||
|
g.drawString(require("locale").dow(new Date(), 2).toUpperCase(), 18, 130);
|
||||||
|
g.setFont("8x12");
|
||||||
|
g.drawString(require("locale").month(new Date(), 2).toUpperCase(), 80, 126);
|
||||||
|
g.setFont("8x12", 2);
|
||||||
|
const time = new Date().getDate();
|
||||||
|
g.drawString(time < 10 ? "0" + time : time, 78, 137);
|
||||||
|
}
|
||||||
|
|
||||||
|
function DrawBattery() {
|
||||||
|
bigThenSmall(E.getBattery(), "%", 135, 21);
|
||||||
|
}
|
||||||
|
|
||||||
|
function DrawRocket() {
|
||||||
|
|
||||||
let Rocket = {
|
let Rocket = {
|
||||||
1: require("heatshrink").decompress(
|
1: require("heatshrink").decompress(
|
||||||
atob(
|
atob(
|
||||||
|
@ -72,36 +103,7 @@ let Rocket = {
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
let rocket_sequence = 1;
|
|
||||||
|
|
||||||
let settings = require('Storage').readJSON("cassioWatch.settings.json", true) || {};
|
|
||||||
let rocketSpeed = settings.rocketSpeed || 700;
|
|
||||||
delete settings;
|
|
||||||
|
|
||||||
g.clear();
|
|
||||||
|
|
||||||
function DrawClock() {
|
|
||||||
g.setFont("7x11Numeric7Seg", 3);
|
|
||||||
g.clearRect(80, 57, 170, 96);
|
|
||||||
g.setColor(0, 255, 255);
|
|
||||||
g.drawRect(80, 57, 170, 96);
|
|
||||||
g.fillRect(80, 57, 170, 96);
|
|
||||||
g.setColor(0, 0, 0);
|
|
||||||
g.drawString(require("locale").time(new Date(), 1), 70, 60);
|
|
||||||
g.setFont("8x12", 2);
|
|
||||||
g.drawString(require("locale").dow(new Date(), 2).toUpperCase(), 18, 130);
|
|
||||||
g.setFont("8x12");
|
|
||||||
g.drawString(require("locale").month(new Date(), 2).toUpperCase(), 80, 126);
|
|
||||||
g.setFont("8x12", 2);
|
|
||||||
const time = new Date().getDate();
|
|
||||||
g.drawString(time < 10 ? "0" + time : time, 78, 137);
|
|
||||||
}
|
|
||||||
|
|
||||||
function DrawBattery() {
|
|
||||||
bigThenSmall(E.getBattery(), "%", 135, 21);
|
|
||||||
}
|
|
||||||
|
|
||||||
function DrawRocket() {
|
|
||||||
g.clearRect(5, 62, 63, 115);
|
g.clearRect(5, 62, 63, 115);
|
||||||
g.setColor(0, 255, 255);
|
g.setColor(0, 255, 255);
|
||||||
g.drawRect(5, 62, 63, 115);
|
g.drawRect(5, 62, 63, 115);
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"description": "Animated Clock with Space Cassio Watch Style",
|
"description": "Animated Clock with Space Cassio Watch Style",
|
||||||
"screenshots": [{ "url": "screens/screen_night.png" },{ "url": "screens/screen_day.png" }],
|
"screenshots": [{ "url": "screens/screen_night.png" },{ "url": "screens/screen_day.png" }],
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"version": "0.6",
|
"version": "0.7",
|
||||||
"type": "clock",
|
"type": "clock",
|
||||||
"tags": "clock, weather, cassio, retro",
|
"tags": "clock, weather, cassio, retro",
|
||||||
"supports": ["BANGLEJS2"],
|
"supports": ["BANGLEJS2"],
|
||||||
|
|
Loading…
Reference in New Issue