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) { ...@@ -108,7 +108,8 @@ void clock_main(void* params) {
if(xQueueReceive(appQueue, &evt, portMAX_DELAY)) { if(xQueueReceive(appQueue, &evt, portMAX_DELAY)) {
switch(evt.type) { switch(evt.type) {
case BUTTON_PRESSED: 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 return; // go back to the main menu
// no break; fall through // no break; fall through
......
...@@ -135,7 +135,8 @@ void compass_main(void *params) ...@@ -135,7 +135,8 @@ void compass_main(void *params)
if(xQueueReceive(appQueue, &evt, 50 / portTICK_RATE_MS)) { if(xQueueReceive(appQueue, &evt, 50 / portTICK_RATE_MS)) {
switch(evt.type) { switch(evt.type) {
case BUTTON_PRESSED: case BUTTON_PRESSED:
if(evt.data.button == BUT_TR) if (evt.data.button == BUT_TR ||
evt.data.button == BUT_TL)
return; return;
/*if(evt.data.button == BUT_BR) { /*if(evt.data.button == BUT_BR) {
......
...@@ -129,7 +129,8 @@ void game_main(void *params) ...@@ -129,7 +129,8 @@ void game_main(void *params)
if(xQueueReceive(appQueue, &evt, 30 / portTICK_RATE_MS)) { if(xQueueReceive(appQueue, &evt, 30 / portTICK_RATE_MS)) {
switch(evt.type) { switch(evt.type) {
case BUTTON_PRESSED: case BUTTON_PRESSED:
if(evt.data.button == BUT_TR) { if (evt.data.button == BUT_TR ||
evt.data.button == BUT_TL) {
vibra_disable(); vibra_disable();
buzzer_disable(); buzzer_disable();
return; return;
......
...@@ -157,16 +157,17 @@ void gpscoord_main(void *params) ...@@ -157,16 +157,17 @@ void gpscoord_main(void *params)
if (xQueueReceive(appQueue, &evt, portMAX_DELAY)) { if (xQueueReceive(appQueue, &evt, portMAX_DELAY)) {
switch (evt.type) { switch (evt.type) {
case BUTTON_PRESSED: case BUTTON_PRESSED:
if (evt.data.button == BUT_TR) if (evt.data.button == BUT_TR ||
evt.data.button == BUT_TL)
return; return;
else if (evt.data.button == BUT_BR) { // else if (evt.data.button == BUT_BR) {
/* // /*
* Toggle between coordinate and // * Toggle between coordinate and
* elevation screens // * elevation screens
*/ // */
gpsscreen += 1; // gpsscreen += 1;
gpsscreen %= 2; // gpsscreen %= 2;
} // }
/* fall through */ /* fall through */
case GPS_TICK: case GPS_TICK:
......
...@@ -63,7 +63,8 @@ void reset_main(void *params) ...@@ -63,7 +63,8 @@ void reset_main(void *params)
if (xQueueReceive(appQueue, &evt, portMAX_DELAY)) { if (xQueueReceive(appQueue, &evt, portMAX_DELAY)) {
switch (evt.type) { switch (evt.type) {
case BUTTON_PRESSED: case BUTTON_PRESSED:
if (evt.data.button == BUT_TR) if (evt.data.button == BUT_TR ||
evt.data.button == BUT_TL)
return; return;
/* Reset on bottom right and bottom left buttons /* Reset on bottom right and bottom left buttons
* pressed */ * pressed */
......
...@@ -93,7 +93,8 @@ void usb_ms_main(void* params) { ...@@ -93,7 +93,8 @@ void usb_ms_main(void* params) {
if(xQueueReceive(appQueue, &evt, 0)) { if(xQueueReceive(appQueue, &evt, 0)) {
switch(evt.type) { switch(evt.type) {
case BUTTON_PRESSED: case BUTTON_PRESSED:
if(evt.data.button == BUT_TR) { if (evt.data.button == BUT_TR ||
evt.data.button == BUT_TL) {
if (mutexours) { if (mutexours) {
mutexours = 0; mutexours = 0;
USBD_Stop(); 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