Sat, 10 Dec 2011 14:56:27 +0100
some pitlane fixing
pitlane/main.c | file | annotate | diff | comparison | revisions |
--- a/pitlane/main.c Sat Dec 10 14:47:34 2011 +0100 +++ b/pitlane/main.c Sat Dec 10 14:56:27 2011 +0100 @@ -253,7 +253,7 @@ //OSCCAL = 0xa0; // internal oscillator @ 4 mhz.... doesnt work accurate! RS232_init(); // initialize RS232 interface - RS232_puts_p(PSTR("Freeslot TrackSwitch / Pitlane v1.3\n")); + RS232_puts_p(PSTR("Freeslot TrackSwitch / Pitlane v1.4\n")); sei(); @@ -287,7 +287,7 @@ */ if (sens[0].car != sens[0].state) { sens[0].state = sens[0].car; -#if TRACKSWITCH_TYPE != TYPE_PITLANE +#if (TRACKSWITCH_TYPE != TYPE_PITLANE) if ( (sens[0].state != 0) && (slot[sens[0].state-1].trackswitch == 0) && (slot[sens[0].state-1].speed>0) ) { response = (1 | ((sens[0].state-1)<<1) | (1 << 4)); @@ -304,7 +304,7 @@ solenoid_delay(); SOLENOID_A_PORT &= ~_BV(SOLENOID_A_PIN); solenoid_delay(); - } + } else #endif if (sens[0].state != 0) { response = (1 | ((sens[0].state-1)<<1)); @@ -334,7 +334,7 @@ solenoid_delay(); SOLENOID_B_PORT &= ~_BV(SOLENOID_B_PIN); solenoid_delay(); - } + } else if (sens[1].state != 0) { response = (1 | ((sens[1].state)<<1) | (2 << 4)); RS232_putc('B');