diff --git a/lambda/Makefile b/lambda/Makefile index 4dd53cb..6810e1b 100644 --- a/lambda/Makefile +++ b/lambda/Makefile @@ -11,7 +11,7 @@ MAIN = lambda.c # en: 0 (default), de: 1 -LANG = 0 +LANG = 1 LOCAL_SOURCE = usart.c interrupts.c adc.c sensors.c integers.c lcdroutines.c \ display.c alert.c command.c strings.c rules.c diff --git a/lambda/interrupts.h b/lambda/interrupts.h index 436faa1..c7d727e 100644 --- a/lambda/interrupts.h +++ b/lambda/interrupts.h @@ -15,7 +15,7 @@ // timer0 clock prescaler/256 = 3.906 kHz @ 1 MHz #define TIMER0_PRESCALE (1 << CS02) // timer0 compare match about every 31.25 ms = 1000 ms >> 5 - #define TIMER0_COMP_MATCH 122 + #define TIMER0_COMP_MATCH 123 // timer1 clock prescaler/8 = 125 kHz @ 1MHz #define TIMER1_PRESCALE (1 << CS11) // timer1 compare match at 7.8 kHz generating a 3.9 kHz beep @@ -26,7 +26,7 @@ // timer0 clock prescaler/1024 = 7.812 kHz @ 8 MHz #define TIMER0_PRESCALE (1 << CS02) | (1 << CS00) // timer0 compare match about every 31.25 ms = 1000 ms >> 5 - #define TIMER0_COMP_MATCH 244 + #define TIMER0_COMP_MATCH 246 // timer1 clock prescaler/64 = 125 kHz @ 8MHz #define TIMER1_PRESCALE (1 << CS11) | (1 << CS10) // timer1 compare match at 7.8 kHz generating a 3.9 kHz beep diff --git a/lambda/pins.h b/lambda/pins.h index 244c81d..b6dc765 100644 --- a/lambda/pins.h +++ b/lambda/pins.h @@ -39,11 +39,11 @@ /* Pins for the LCD */ #define LCD_PORT PORTD #define LCD_DDR DDRD -#define LCD_RS PD7 // prototype: PD6 -#define LCD_EN PD6 // prototype: PD7 +#define LCD_RS PD6 // prototype: PD6 +#define LCD_EN PD7 // prototype: PD7 #define LCD_DB4 PD5 -#define LCD_DB5 PD4 // prototype: PD2 +#define LCD_DB5 PD2 // prototype: PD2 #define LCD_DB6 PD3 -#define LCD_DB7 PD2 // prototype: PD4 +#define LCD_DB7 PD4 // prototype: PD4 #endif /* PINS_H_ */ diff --git a/lambda/rules.c b/lambda/rules.c index 4fcddad..7a81821 100644 --- a/lambda/rules.c +++ b/lambda/rules.c @@ -123,7 +123,7 @@ */ static void warmStart(bool* const fired, int8_t const dir, Measurement const meas) { - if (dir == firing_up && ! isHeaterOn() && + if ((dir == firing_up || dir == burning) && ! isHeaterOn() && getHeaterState() != heaterStateFault) { // it seems wood has been added or - probably more likely - oven // was fired up without resetting. Should probably work that way diff --git a/lambda/sensors.h b/lambda/sensors.h index 37ca5ec..0a4a4a3 100644 --- a/lambda/sensors.h +++ b/lambda/sensors.h @@ -13,7 +13,7 @@ #include -#define SHUNT_MILLIOHMS 100 +#define SHUNT_MILLIOHMS 111 /** * Oxygen sensor heater current limits at certain states in milliamps. @@ -137,8 +137,7 @@ int8_t getHeaterState(void); /** - * Returns the time in seconds that the heater takes to warm up since it was - * switched on. + * Returns the time in seconds passed since that the heater was switched on. */ uint32_t getHeaterUptime(void);