Skip to content

Commit

Permalink
Minor menu fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MiLeG committed Jan 10, 2019
1 parent 3765b5c commit 6a0a852
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/MAKERphone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4211,7 +4211,7 @@ void MAKERphone::mediaApp() {
mp3player(mp3Files[index]);
}
}
if(input == 1)
else if(input == 1)
{
while (!SD.begin(5, SD_SCK_MHZ(8)))
Serial.println("SD card error");
Expand All @@ -4223,10 +4223,13 @@ void MAKERphone::mediaApp() {
break;
Serial.println(index);
drawJpeg(photoFiles[index], 0, 0);
while(!buttons.released(BTN_A))
while(!buttons.released(BTN_A) && !buttons.released(BTN_B))
update();
}
while(!update());
}
else if(input == -1)
break;
}
}
void MAKERphone::drawJpeg(String filename, int xpos, int ypos) {
Expand Down Expand Up @@ -4664,6 +4667,8 @@ bool MAKERphone::settingsApp() {
if (input == 5)
if(updateMenu())
return true;
}


applySettings();
display.fillScreen(TFT_BLACK);
Expand Down Expand Up @@ -4692,7 +4697,7 @@ bool MAKERphone::settingsApp() {
while(!update());
}
return false;
}

}
void MAKERphone::networkMenu() {
uint8_t cursor = 0;
Expand Down Expand Up @@ -4834,7 +4839,7 @@ void MAKERphone::networkMenu() {
airplaneMode = !airplaneMode;
}

if (buttons.kpd.pin_read(JOYSTICK_D) == 0)
if (buttons.kpd.pin_read(JOYSTICK_D) == 0)
{
while (buttons.kpd.pin_read(JOYSTICK_D) == 0);
if (cursor == 0)
Expand All @@ -4852,7 +4857,11 @@ void MAKERphone::networkMenu() {

}
if (buttons.released(BTN_B)) //BUTTON BACK
{
while(!update());
break;
}


update();
}
Expand Down

0 comments on commit 6a0a852

Please sign in to comment.