# HG changeset patch # User Malte Bayer # Date 1323456800 -3600 # Node ID 66dd5763dfb38b2cd0588eb7b6d76720d42b6c72 # Parent 040b6b2094fbfcffd30aa271acb09e1c6c539dc2 added car5+6 to trackswitch detector diff -r 040b6b2094fb -r 66dd5763dfb3 blackbox/main.c --- a/blackbox/main.c Fri Dec 09 19:41:28 2011 +0100 +++ b/blackbox/main.c Fri Dec 09 19:53:20 2011 +0100 @@ -27,8 +27,8 @@ #define MAX_SLOTS 6 #define FUEL_FULL 10000 -//#define FUEL_DIVISOR 25 -#define FUEL_DIVISOR 10 +#define FUEL_DIVISOR 25 +//#define FUEL_DIVISOR 10 typedef struct { unsigned speedlimit:4; // 4bits speedlimit unsigned speedminimum:4; // 4bits speedminimum diff -r 040b6b2094fb -r 66dd5763dfb3 trackswitch/main.c --- a/trackswitch/main.c Fri Dec 09 19:41:28 2011 +0100 +++ b/trackswitch/main.c Fri Dec 09 19:53:20 2011 +0100 @@ -162,6 +162,8 @@ if ( (tmp > 118) && (tmp < 138) ) car0 = 2; if ( (tmp > 186) && (tmp < 206) ) car0 = 3; if ( (tmp > 246) && (tmp < 266) ) car0 = 4; + if ( (tmp > 310) && (tmp < 330) ) car0 = 5; + if ( (tmp > 374) && (tmp < 394) ) car0 = 6; } car0_old = car0_new; } @@ -179,6 +181,8 @@ if ( (tmp > 114) && (tmp < 146) ) car1 = 2; if ( (tmp > 183) && (tmp < 210) ) car1 = 3; if ( (tmp > 242) && (tmp < 270) ) car1 = 4; + if ( (tmp > 310) && (tmp < 330) ) car1 = 5; + if ( (tmp > 374) && (tmp < 394) ) car1 = 6; } car1_old = car1_new; } @@ -195,6 +199,8 @@ if ( (tmp > 114) && (tmp < 146) ) car1 = 2; if ( (tmp > 183) && (tmp < 210) ) car1 = 3; if ( (tmp > 242) && (tmp < 270) ) car1 = 4; + if ( (tmp > 310) && (tmp < 330) ) car1 = 5; + if ( (tmp > 374) && (tmp < 394) ) car1 = 6; } car1_old = car1_new; }