aboutsummaryrefslogtreecommitdiffhomepage
path: root/Cart_Reader
diff options
context:
space:
mode:
authorVincent Pelletier <[email protected]>2022-11-05 01:01:58 +0000
committerVincent Pelletier <[email protected]>2022-11-05 01:02:18 +0000
commit6de1a34cd7c0ae9e381bd48bd1f3c8342773a50d (patch)
tree16151452f67e60d37882dc0d2c781f0f441d0857 /Cart_Reader
parent4d3cdd900489b8092c888b7f3e98cc7e72400b97 (diff)
downloadcartreader-6de1a34cd7c0ae9e381bd48bd1f3c8342773a50d.tar.gz
cartreader-6de1a34cd7c0ae9e381bd48bd1f3c8342773a50d.zip
Cart_Reader.ino: Catch-all condition for page 3
Makes it clear to the compiler that no other page exist, and hence option_offset and num_answers are always initialised.
Diffstat (limited to 'Cart_Reader')
-rw-r--r--Cart_Reader/Cart_Reader.ino6
1 files changed, 2 insertions, 4 deletions
diff --git a/Cart_Reader/Cart_Reader.ino b/Cart_Reader/Cart_Reader.ino
index 7c2df40..2c918eb 100644
--- a/Cart_Reader/Cart_Reader.ino
+++ b/Cart_Reader/Cart_Reader.ino
@@ -936,12 +936,10 @@ void mainMenu() {
if (currPage == 1) {
option_offset = 0;
num_answers = 7;
- }
- if (currPage == 2) {
+ } else if (currPage == 2) {
option_offset = 7;
num_answers = 7;
- }
- if (currPage == 3) {
+ } else { // currPage == 3
option_offset = 14;
num_answers = 2;
}