# HG changeset patch # User Malte Bayer # Date 1321442949 -3600 # Node ID f4e250d5402b79e804ca33734b44575a1089f2a3 # Parent 2405aff29a51a5654df632dfd8d5a68139ff180b fixes, bound lap counter reset to race start button diff -r 2405aff29a51 -r f4e250d5402b blackbox/driver/adc.c --- a/blackbox/driver/adc.c Tue Nov 15 12:51:04 2011 +0100 +++ b/blackbox/driver/adc.c Wed Nov 16 12:29:09 2011 +0100 @@ -12,11 +12,11 @@ // get a sample from ADC chip. // chanell must be in range 0-7. uint16_t getADC(int channel) { - if (channel == 0) +// if (channel == 0) adcReference = ((1< 0) { diff -r 2405aff29a51 -r f4e250d5402b blackbox/main.h --- a/blackbox/main.h Tue Nov 15 12:51:04 2011 +0100 +++ b/blackbox/main.h Wed Nov 16 12:29:09 2011 +0100 @@ -13,8 +13,8 @@ #define MODUL_ST6 PD6 #define I2C_PORT PORTC -#define I2C_SDA PC0 -#define I2C_SCL PC1 +#define I2C_SCL PC0 +#define I2C_SDA PC1 #define LED1_PORT PORTA #define LED2_PORT PORTA @@ -45,10 +45,10 @@ #define CONTROLLER_PORT PORTB #define CONTROLLER_MAX 360 // full throttle ADC value #define CONTROLLER_DIVISOR (uint8_t)(CONTROLLER_MAX/15) -#define CONTROLLER1_SW 4 -#define CONTROLLER2_SW 5 -#define CONTROLLER3_SW 6 -#define CONTROLLER4_SW 7 +#define CONTROLLER1_SW PB4 +#define CONTROLLER2_SW PB5 +#define CONTROLLER3_SW PB6 +#define CONTROLLER4_SW PB7 #define CONTROLLER1_SPEED 0 // ADC channel # #define CONTROLLER2_SPEED 1 // ADC channel # #define CONTROLLER3_SPEED 2 // ADC channel #