uid = (uid*10) + (last_key%10);
set_char((last_key%10)+'0', 4+uidpos);
}
- return 1;
+ return (uid!=0);
}
-
bool pin_enter() {
u8 pinpos;
/* We ask for a pin, display a PIN: prompt. PINs must be a 4 digit number.
}
void make_request(u8 selection) {
+ set_msg("REQUESTING", WRAP_NONE); /* XXX: maybe this isn't needed? */
switch(server_request(uid, pin, selection)) {
case REQUEST_OK:
set_msg("THANK YOU!", WRAP_NONE);
set_msg("ENTER SELECTION OR INSERT COINS ", WRAP_SCROLL);
selection = 0;
while(1) {
- if (coin_value) {
+ if (coin_value) { /* we have coins inserted */
int prev_coin = 0;
/* alternate between the price and a confirm message */
while (coin_value) {
if (keypad_pressed()) {
switch (last_key) {
case KEY_RESET:
- coin_refund();
+ scroll_msg("PRESS COIN REFUND");
goto reset;
case KEY_0:
switch (server_credit_account(uid, pin, coin_value)) {