Skip to content
Snippets Groups Projects
Commit 33b09b7a authored by Bernard Blackham's avatar Bernard Blackham
Browse files

To ROM J.

This fails - suspect change in soft registers
parent 69e91c63
No related merge requests found
...@@ -8,7 +8,7 @@ INCLUDES = vend.h keypad.h chime.h asm.h display_basic.h ports.h types.h ...@@ -8,7 +8,7 @@ INCLUDES = vend.h keypad.h chime.h asm.h display_basic.h ports.h types.h
# debugging doesn't get compiled into the ROM image # debugging doesn't get compiled into the ROM image
CFLAGS = -m68hc11 -mshort -Wall -O1 \ CFLAGS = -m68hc11 -mshort -Wall -O1 \
-msoft-reg-count=0 -ffixed-z -g -fomit-frame-pointer -msoft-reg-count=1 -ffixed-z -g -fomit-frame-pointer
LDFLAGS = -m68hc11 -mshort -Wl,-m,m68hc11elfb \ LDFLAGS = -m68hc11 -mshort -Wl,-m,m68hc11elfb \
-nostartfiles \ -nostartfiles \
......
...@@ -190,15 +190,15 @@ int main() { ...@@ -190,15 +190,15 @@ int main() {
if (door_open() != last_door_open) { if (door_open() != last_door_open) {
last_door_open = door_open(); last_door_open = door_open();
send_door_msg(last_door_open); send_door_msg(last_door_open);
chime_start();
if (last_door_open) { if (last_door_open) {
chime_start();
set_msg("DOOR OPEND"); set_msg("DOOR OPEND");
} else { } else {
chime_start();
set_msg("DOOR CLOSE"); set_msg("DOOR CLOSE");
} }
} }
/*
if (rx_queue_state) { if (rx_queue_state) {
switch (msg_buf[0]) { switch (msg_buf[0]) {
case 'V': case 'V':
...@@ -220,12 +220,13 @@ int main() { ...@@ -220,12 +220,13 @@ int main() {
ping_pong(); ping_pong();
break; break;
default: default:
/* shrug */ // shurg
send_nack(); send_nack();
break; break;
} }
msg_clr(); msg_clr();
} }
*/
keypad_read(); keypad_read();
if (keypad_pressed()) { if (keypad_pressed()) {
...@@ -251,9 +252,11 @@ int main() { ...@@ -251,9 +252,11 @@ int main() {
send_keypress(last_key); send_keypress(last_key);
} }
/*
if (coin_value != last_coin_value) { if (coin_value != last_coin_value) {
send_balance(); send_balance();
last_coin_value = coin_value; last_coin_value = coin_value;
} }
*/
} }
} }
...@@ -136,9 +136,7 @@ u8 dispense_motor(u8 slot) { ...@@ -136,9 +136,7 @@ u8 dispense_motor(u8 slot) {
//if (!is_motor(slot)) return MOTOR_NOSLOT; //if (!is_motor(slot)) return MOTOR_NOSLOT;
motor_on(slot); motor_on(slot);
delay(1000); delay(100);
motors_off();
return MOTOR_SUCCESS;
if (!left_home(slot)) { if (!left_home(slot)) {
motors_off(); motors_off();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment