Get ready for the next burning.
[uccvend-snackrom.git] / ROM2 / main_basic.c
index 5797318..84372ce 100644 (file)
@@ -4,7 +4,7 @@
  * and snacks.
  */
 
-#define VERSION_STRING "V 20040624"
+#define VERSION_STRING "X 20040625"
 
 #include "display_basic.h"
 #include "keypad.h"
@@ -85,7 +85,7 @@ void dispense_something() {
                                send_string("101 Vending ");
                                send_string(motor);
                                send_string(CRLF);
-                               motor_reply(dispense_motor(motor[0]*10+motor[1]));
+                               motor_reply(dispense_motor((motor[0]-'0')*10+(motor[1]-'0')));
                        }
                }
                send_string("102 Vend all motors complete." CRLF);
@@ -146,7 +146,7 @@ void give_change() {
                (sci_rx_buf[3] < '0') || (sci_rx_buf[3] > '9') ||
                (sci_rx_buf[4] < '0') || (sci_rx_buf[4] > '9') ||
                (sci_rx_buf[5] < '0') || (sci_rx_buf[5] > '9')) {
-               send_nack();
+               //send_nack();
        }
        cost = sci_rx_buf[1] - '0';
        cost *= 10; cost = sci_rx_buf[2] - '0';
@@ -155,7 +155,7 @@ void give_change() {
        cost *= 10; cost = sci_rx_buf[5] - '0';
 
        coin_cost(cost);
-       send_ack();
+       //send_ack();
 } 
 
 void send_keypress(u8 key) {
@@ -416,7 +416,7 @@ void help() {
                " ECHO {ON|OFF} turn echo on or off" CRLF
                " GETROM        download the ROM source code using xmodem" CRLF
                " H[...]        this help screen" CRLF
-               "*JUMPxxxx      jumps to a subroute at location xxxx" CRLF
+               "*JUMPxxxx      jumps to a subroutine at location xxxx" CRLF
                "*PEEKxxxx      returns the value of the byte at location xxxx" CRLF
                "*POKExxxxyy    sets the value of location xxxx to yy" CRLF
                " PING          pongs" CRLF
@@ -424,6 +424,7 @@ void help() {
                "+Vnn           vend an item" CRLF
                "+VALL          vend all items" CRLF
                "*Wxxxxxxxxxxxx set a new password for authenticated vends. xxx=16 chars" CRLF
+               "               password will be converted to uppercase" CRLF
                "" CRLF
                "Very few functions are available when the machine is in standalone " CRLF
                "mode (DIP SW 1 is set)" CRLF
@@ -538,8 +539,6 @@ int main() {
 
        send_string("5N4X0RZ R US" CRLF);
 
-       mic_challenge = 0;
-       
        last_standalone = is_standalone();
        if (last_standalone)
                cur_motor[0] = 0xff;
@@ -583,6 +582,7 @@ int main() {
                }
 
                if (sci_have_packet) {
+                       send_string(CRLF);
                        switch (sci_rx_buf[0]) {
                                case '\0':
                                case '#':

UCC git Repository :: git.ucc.asn.au