set_msg("ENTER SELECTION OR INSERT COINS", WRAP_SCROLL);
}
+void load_default_msg() {
+ /* FIXME: want this message to be changeable from the server */
+ set_msg("UNIVERSITY COMPUTER CLUB *** INSERT COINS OR USER-ID *** ",
+ WRAP_SCROLL);
+}
+
+void service_menu() {
+ while (door_open()) { /* don't quit until door is closed */
+
+ }
+}
+
int main() {
/* do stuff */
set_msg("UNIVERSITY", WRAP_NONE);
set_msg(" CLUB ", WRAP_NONE);
delay(1000);
- /* FIXME: want this message to be changeable from the server */
- set_msg("UNIVERISTY COMPUTER CLUB *** INSERT COINS OR USER-ID ***",
- WRAP_SCROLL);
+ load_default_msg();
while(1) {
/* this needs to be a relatively tight loop to make sure we catch
* keypresses at the main menu
switch (server_authenticate(uid, pin)) {
case AUTH_GOOD:
selection_menu();
+ break;
case AUTH_BAD:
set_msg(" BAD USER ", WRAP_NONE);
delay(1000);
pin = 0;
/* move on */
}
+ load_default_msg();
}
+
+ /* test door switch */
+ if (door_open()) {
+ service_menu();
+ load_default_msg();
+ }
+
+ /* check on coin mech */
}
}