X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=ROM2%2Fmotors.c;fp=ROM2%2Fmotors.c;h=3fd99a2bf5077081b4ef8517e1bc86c39b39737b;hb=24ecd46fb709e0b5994f6c3fa77c400ae9b92efa;hp=674483942718d3eec5d474fe3da9eee7a480157c;hpb=f454d8fbc15ff6516ba574e23692e8a65b9f16fd;p=uccvend-snackrom.git diff --git a/ROM2/motors.c b/ROM2/motors.c index 6744839..3fd99a2 100644 --- a/ROM2/motors.c +++ b/ROM2/motors.c @@ -81,7 +81,7 @@ bool left_home(u8 slot) { r = 1 << r; for (i = 0; i < 5; i++) - if (home_sensors & r == 0) return 1; + if ((home_sensors & r) == 0) return 1; /* it never left */ return 0; @@ -94,7 +94,7 @@ bool back_home(u8 slot) { for (i = 0; i < 5; i++) { if (home_sensors & r) return 1; - if (_io_ports[M6811_PORTE] & PORTE_MOTOR_OVERCURRENT == 0) return 1; + if ((_io_ports[M6811_PORTE] & PORTE_MOTOR_OVERCURRENT) == 0) return 1; } /* it never left */