# HG changeset patch # User Malte Bayer # Date 1323525387 -3600 # Node ID 60c4b28fd773f671dd3840f2bbc9468005a8212c # Parent 2a49d2586fbfb2f7a1c3598ac8800438d7c326a7 some pitlane fixing diff -r 2a49d2586fbf -r 60c4b28fd773 pitlane/main.c --- 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');