Enable / Disable Touchscreen #481

This commit will reverse the logic of touch screen as suggested by @ArjanOnwezen
This commit is contained in:
Žiga Deisinger
2022-01-27 14:23:22 +01:00
parent 4a0d42ed34
commit cebbc12084
5 changed files with 10 additions and 10 deletions
+3 -3
View File
@@ -281,7 +281,7 @@ void SetPlayDeadView::focus() {
SetUIView::SetUIView(NavigationView& nav) {
add_children({
//&checkbox_login,
&checkbox_enable_touchscreen,
&checkbox_disable_touchscreen,
&checkbox_speaker,
&checkbox_bloff,
&options_bloff,
@@ -291,7 +291,7 @@ SetUIView::SetUIView(NavigationView& nav) {
&button_ok
});
checkbox_enable_touchscreen.set_value(persistent_memory::enable_touchscreen());
checkbox_disable_touchscreen.set_value(persistent_memory::disable_touchscreen());
checkbox_speaker.set_value(persistent_memory::config_speaker());
checkbox_showsplash.set_value(persistent_memory::config_splash());
checkbox_showclock.set_value(!persistent_memory::hide_clock());
@@ -334,7 +334,7 @@ SetUIView::SetUIView(NavigationView& nav) {
}
persistent_memory::set_config_splash(checkbox_showsplash.value());
persistent_memory::set_clock_hidden(!checkbox_showclock.value());
persistent_memory::set_enable_touchscreen(checkbox_enable_touchscreen.value());
persistent_memory::set_disable_touchscreen(checkbox_disable_touchscreen.value());
//persistent_memory::set_config_login(checkbox_login.value());
nav.pop();
};
+2 -2
View File
@@ -225,10 +225,10 @@ private:
"Login with play dead"
};*/
Checkbox checkbox_enable_touchscreen {
Checkbox checkbox_disable_touchscreen {
{ 3 * 8, 2 * 16 },
20,
"Enable touchscreen"
"Disable touchscreen"
};
Checkbox checkbox_speaker {
+1 -1
View File
@@ -109,7 +109,7 @@ void Manager::feed(const Frame& frame) {
switch(state) {
case State::NoTouch:
if( touch_stable && touch_pressure && persistent_memory::enable_touchscreen()) {
if( touch_stable && touch_pressure && !persistent_memory::disable_touchscreen()) {
if( point_stable() ) {
state = State::TouchDetected;
touch_started();