blackbox/main.c

changeset 81
4f2f94a043fd
parent 77
cede78304992
child 83
c8e7a69a318a
--- a/blackbox/main.c	Wed Dec 14 20:43:08 2011 +0100
+++ b/blackbox/main.c	Thu Dec 15 17:58:22 2011 +0100
@@ -26,6 +26,7 @@
 } u32;
 
 #define FUEL_FULL       10000
+#define FUEL_JUMPSTART  5000
 #define FUEL_DIV_DEFAULT 25
 volatile uint8_t fuel_divisor = FUEL_DIV_DEFAULT; // default, can be set via serial command
 
@@ -272,11 +273,12 @@
     if (slot[controller].jumpstart_time == 0) {
         slot[controller].jumpstart_time = sysclk.word[0]; // low word
         RS232_putc('~');
-        RS232_putc('0'-controller);
+        RS232_putc('0'+controller);
         RS232_putc(':');
         itoa(slot[controller].jumpstart_time, s, 16);
         RS232_puts(s);
         RS232_putc('\n');
+        slot[controller].fuel = FUEL_JUMPSTART; // suck 50% off that bitch!
     }
 
 }
@@ -316,7 +318,8 @@
             if (tmp > slot[controller].speedlimit) tmp = slot[controller].speedlimit;
             speed = tmp;
             tmp = tmp << 1;
-            if (trackchange || slot[controller].trackswitch) tmp |= (1<<5);
+            //if ( (trackchange!=0) || (slot[controller].trackswitch)) tmp |= (1<<5);
+            if (trackchange!=0) tmp |= (1<<5);
         }
 
     }

mercurial