Update app.js
parent
afe6e6e00d
commit
70ee2f9e57
|
|
@ -23,7 +23,7 @@ var test_file = config_file.read(config_file.getLength());
|
||||||
|
|
||||||
if (test_file !== undefined) {
|
if (test_file !== undefined) {
|
||||||
astral_settings = JSON.parse(test_file);
|
astral_settings = JSON.parse(test_file);
|
||||||
if (astral_settings.default)
|
if (astral_settings.astral_default)
|
||||||
display_colour = default_colour;
|
display_colour = default_colour;
|
||||||
else
|
else
|
||||||
display_colour = setupcomplete_colour;
|
display_colour = setupcomplete_colour;
|
||||||
|
|
@ -34,7 +34,7 @@ if (astral_settings === undefined) {
|
||||||
version: 1,
|
version: 1,
|
||||||
lat: 51.9492,
|
lat: 51.9492,
|
||||||
lon: 0.2834,
|
lon: 0.2834,
|
||||||
default: true,
|
astral_default: true,
|
||||||
extras: [
|
extras: [
|
||||||
{ name: "Andromeda", ra: "004244", de: "411609", type: 3 },
|
{ name: "Andromeda", ra: "004244", de: "411609", type: 3 },
|
||||||
{ name: "Cigar", ra: "095552", de: "694047", type: 3 },
|
{ name: "Cigar", ra: "095552", de: "694047", type: 3 },
|
||||||
|
|
@ -695,7 +695,7 @@ function draw_moon(phase) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function draw() {
|
function draw() {
|
||||||
if (astral_settings.default)
|
if (astral_settings.astral_default)
|
||||||
display_colour = default_colour;
|
display_colour = default_colour;
|
||||||
else if (!colours_switched)
|
else if (!colours_switched)
|
||||||
display_colour = setupcomplete_colour;
|
display_colour = setupcomplete_colour;
|
||||||
|
|
@ -780,7 +780,7 @@ Bangle.on('lcdPower', on => {
|
||||||
if (secondInterval) clearInterval(secondInterval);
|
if (secondInterval) clearInterval(secondInterval);
|
||||||
secondInterval = undefined;
|
secondInterval = undefined;
|
||||||
Bangle.setCompassPower(0);
|
Bangle.setCompassPower(0);
|
||||||
if (!astral_settings.default)
|
if (!astral_settings.astral_default)
|
||||||
Bangle.setGPSPower(0);
|
Bangle.setGPSPower(0);
|
||||||
if (on) {
|
if (on) {
|
||||||
Bangle.setCompassPower(1);
|
Bangle.setCompassPower(1);
|
||||||
|
|
@ -817,7 +817,7 @@ setWatch(function () {
|
||||||
}, BTN1, { repeat: true });
|
}, BTN1, { repeat: true });
|
||||||
|
|
||||||
setWatch(function () {
|
setWatch(function () {
|
||||||
if (!astral_settings.default) {
|
if (!astral_settings.astral_default) {
|
||||||
colours_switched = true;
|
colours_switched = true;
|
||||||
if (display_colour == setupcomplete_colour)
|
if (display_colour == setupcomplete_colour)
|
||||||
display_colour = default_colour;
|
display_colour = default_colour;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue