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
Richard de Boer 2021-05-13 15:21:24 +02:00
parent 195f5928f6
commit 14c4bfdb8b
4 changed files with 1 additions and 15 deletions

View File

@ -2,4 +2,4 @@
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.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

View File

@ -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.
(If the app opened automatically, it closes after music has been paused for 5 minutes.)
**Touch controls**:
Enable touch controls?
## Controls

View File

@ -13,10 +13,6 @@ let info = {
};
const POUT = 300000; // auto close timeout when paused: 5 minutes (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
@ -355,7 +351,6 @@ function controlColor(ctrl) {
return (ctrl in tCommand) ? "#ff0000" : "#008800";
}
function drawControl(ctrl, x, y) {
if (!TCTL) {return;}
g.setColor(controlColor(ctrl));
const s = 20;
if (stat!==controlState) {
@ -537,7 +532,6 @@ function togglePlay() {
sendCommand(stat==="play" ? "pause" : "play");
}
function startTouchWatches() {
if (!TCTL) {return;}
Bangle.on("touch", side => {
if (!Bangle.isLCDOn()) {return;} // for <2v10 firmware
switch(side) {

View File

@ -9,7 +9,6 @@
// initialize with default settings...
let s = {
autoStart: true,
touch: true,
};
// ...and overwrite them with any saved values
// This way saved values are preserved if a new version adds more settings
@ -35,11 +34,6 @@
format: yesNo,
onchange: save("autoStart"),
};
menu[translate("Touch controls")] = {
value: !!s.touch,
format: yesNo,
onchange: save("touch"),
};
E.showMenu(menu);
});