gbmusic: Remove touch controls setting
Firmware 2v10 will disable touch/swipe while the LCD is off anyway, so just enable them always. (but keeps the check that the LCD is on until the whole world has upgraded their firmware)master
parent
195f5928f6
commit
14c4bfdb8b
|
|
@ -2,4 +2,4 @@
|
||||||
0.02: Increase text brightness, improve controls, (try to) reduce memory usage
|
0.02: Increase text brightness, improve controls, (try to) reduce memory usage
|
||||||
0.03: Only auto-start if active app is a clock, auto close after 1 hour of inactivity
|
0.03: Only auto-start if active app is a clock, auto close after 1 hour of inactivity
|
||||||
0.04: Setting to disable touch controls, minor bugfix
|
0.04: Setting to disable touch controls, minor bugfix
|
||||||
0.05: Simplify touch controls setting, reduce fadeout flicker
|
0.05: Remove touch controls setting, reduce fadeout flicker
|
||||||
|
|
@ -22,8 +22,6 @@ You can change these under `Settings`->`App/Widget Settings`->`Music Controls`.
|
||||||
Automatically load the app when you play music and close when the music stops.
|
Automatically load the app when you play music and close when the music stops.
|
||||||
(If the app opened automatically, it closes after music has been paused for 5 minutes.)
|
(If the app opened automatically, it closes after music has been paused for 5 minutes.)
|
||||||
|
|
||||||
**Touch controls**:
|
|
||||||
Enable touch controls?
|
|
||||||
|
|
||||||
## Controls
|
## Controls
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,10 +13,6 @@ let info = {
|
||||||
};
|
};
|
||||||
const POUT = 300000; // auto close timeout when paused: 5 minutes (in ms)
|
const POUT = 300000; // auto close timeout when paused: 5 minutes (in ms)
|
||||||
const IOUT = 3600000; // auto close timeout for inactivity: 1 hour (in ms)
|
const IOUT = 3600000; // auto close timeout for inactivity: 1 hour (in ms)
|
||||||
// Touch controls?
|
|
||||||
let s = require("Storage").readJSON("gbmusic.json", 1) || {};
|
|
||||||
const TCTL = ("touch" in s) ? !!s.touch : true; // previous versions used an int for this setting
|
|
||||||
delete s;
|
|
||||||
|
|
||||||
///////////////////////
|
///////////////////////
|
||||||
// Self-repeating timeouts
|
// Self-repeating timeouts
|
||||||
|
|
@ -355,7 +351,6 @@ function controlColor(ctrl) {
|
||||||
return (ctrl in tCommand) ? "#ff0000" : "#008800";
|
return (ctrl in tCommand) ? "#ff0000" : "#008800";
|
||||||
}
|
}
|
||||||
function drawControl(ctrl, x, y) {
|
function drawControl(ctrl, x, y) {
|
||||||
if (!TCTL) {return;}
|
|
||||||
g.setColor(controlColor(ctrl));
|
g.setColor(controlColor(ctrl));
|
||||||
const s = 20;
|
const s = 20;
|
||||||
if (stat!==controlState) {
|
if (stat!==controlState) {
|
||||||
|
|
@ -537,7 +532,6 @@ function togglePlay() {
|
||||||
sendCommand(stat==="play" ? "pause" : "play");
|
sendCommand(stat==="play" ? "pause" : "play");
|
||||||
}
|
}
|
||||||
function startTouchWatches() {
|
function startTouchWatches() {
|
||||||
if (!TCTL) {return;}
|
|
||||||
Bangle.on("touch", side => {
|
Bangle.on("touch", side => {
|
||||||
if (!Bangle.isLCDOn()) {return;} // for <2v10 firmware
|
if (!Bangle.isLCDOn()) {return;} // for <2v10 firmware
|
||||||
switch(side) {
|
switch(side) {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@
|
||||||
// initialize with default settings...
|
// initialize with default settings...
|
||||||
let s = {
|
let s = {
|
||||||
autoStart: true,
|
autoStart: true,
|
||||||
touch: true,
|
|
||||||
};
|
};
|
||||||
// ...and overwrite them with any saved values
|
// ...and overwrite them with any saved values
|
||||||
// This way saved values are preserved if a new version adds more settings
|
// This way saved values are preserved if a new version adds more settings
|
||||||
|
|
@ -35,11 +34,6 @@
|
||||||
format: yesNo,
|
format: yesNo,
|
||||||
onchange: save("autoStart"),
|
onchange: save("autoStart"),
|
||||||
};
|
};
|
||||||
menu[translate("Touch controls")] = {
|
|
||||||
value: !!s.touch,
|
|
||||||
format: yesNo,
|
|
||||||
onchange: save("touch"),
|
|
||||||
};
|
|
||||||
|
|
||||||
E.showMenu(menu);
|
E.showMenu(menu);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue