Commit da2dd42b authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana

Made all apps return on BUT_TL as well

Also removed second (for now) redundant GPS coordinate app screen
parent 38e0cf16
......@@ -108,7 +108,8 @@ void clock_main(void* params) {
if(xQueueReceive(appQueue, &evt, portMAX_DELAY)) {
switch(evt.type) {
case BUTTON_PRESSED:
if(evt.data.button == BUT_TR)
if (evt.data.button == BUT_TR ||
evt.data.button == BUT_TL)
return; // go back to the main menu
// no break; fall through
......
......@@ -135,7 +135,8 @@ void compass_main(void *params)
if(xQueueReceive(appQueue, &evt, 50 / portTICK_RATE_MS)) {
switch(evt.type) {
case BUTTON_PRESSED:
if(evt.data.button == BUT_TR)
if (evt.data.button == BUT_TR ||
evt.data.button == BUT_TL)
return;
/*if(evt.data.button == BUT_BR) {
......
......@@ -129,7 +129,8 @@ void game_main(void *params)
if(xQueueReceive(appQueue, &evt, 30 / portTICK_RATE_MS)) {
switch(evt.type) {
case BUTTON_PRESSED:
if(evt.data.button == BUT_TR) {
if (evt.data.button == BUT_TR ||
evt.data.button == BUT_TL) {
vibra_disable();
buzzer_disable();
return;
......
......@@ -157,16 +157,17 @@ void gpscoord_main(void *params)
if (xQueueReceive(appQueue, &evt, portMAX_DELAY)) {
switch (evt.type) {
case BUTTON_PRESSED:
if (evt.data.button == BUT_TR)
if (evt.data.button == BUT_TR ||
evt.data.button == BUT_TL)
return;
else if (evt.data.button == BUT_BR) {
/*
* Toggle between coordinate and
* elevation screens
*/
gpsscreen += 1;
gpsscreen %= 2;
}
// else if (evt.data.button == BUT_BR) {
// /*
// * Toggle between coordinate and
// * elevation screens
// */
// gpsscreen += 1;
// gpsscreen %= 2;
// }
/* fall through */
case GPS_TICK:
......
......@@ -63,7 +63,8 @@ void reset_main(void *params)
if (xQueueReceive(appQueue, &evt, portMAX_DELAY)) {
switch (evt.type) {
case BUTTON_PRESSED:
if (evt.data.button == BUT_TR)
if (evt.data.button == BUT_TR ||
evt.data.button == BUT_TL)
return;
/* Reset on bottom right and bottom left buttons
* pressed */
......
......@@ -93,7 +93,8 @@ void usb_ms_main(void* params) {
if(xQueueReceive(appQueue, &evt, 0)) {
switch(evt.type) {
case BUTTON_PRESSED:
if(evt.data.button == BUT_TR) {
if (evt.data.button == BUT_TR ||
evt.data.button == BUT_TL) {
if (mutexours) {
mutexours = 0;
USBD_Stop();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment