diff --git a/lambda-test/rules-test.c b/lambda-test/rules-test.c index cf428f1..2d5903b 100644 --- a/lambda-test/rules-test.c +++ b/lambda-test/rules-test.c @@ -188,6 +188,7 @@ return true; } +/* static bool testTooRich(void) { Measurement meas = {0, 0, 0, 0}; @@ -233,6 +234,7 @@ return true; } +*/ static bool testTooLean(void) { @@ -251,14 +253,14 @@ meas.lambda = 1300; resetRules(true); reason(meas); - assertFalse(rules[4].fired); + assertFalse(rules[3].fired); meas.tempI = TEMP_AIRGATE_50 + 1; meas.lambda = LAMBDA_TOO_LEAN + 1; resetRules(true); airgate = 50; reason(meas); - assertFalse(rules[4].fired); + assertFalse(rules[3].fired); assertTrue(50 == airgate); meas.tempI = TEMP_AIRGATE_50 + 1; @@ -266,7 +268,7 @@ resetRules(true); airgate = 100; reason(meas); - assertTrue(rules[4].fired); + assertTrue(rules[3].fired); assertTrue(50 == airgate); cancelAlert(false); @@ -283,27 +285,27 @@ meas.tempI = 50; age = 0; reason(meas); - assertFalse(rules[5].fired); + assertFalse(rules[4].fired); meas.tempI = TEMP_FIRE_OUT; age = 0; reason(meas); - assertFalse(rules[5].fired); + assertFalse(rules[4].fired); meas.tempI = TEMP_FIRE_OUT_RESET; age = 0; reason(meas); - assertFalse(rules[5].fired); + assertFalse(rules[4].fired); meas.tempI = TEMP_FIRE_OUT - 1; age = 0; reason(meas); - assertTrue(rules[5].fired); + assertTrue(rules[4].fired); meas.tempI = TEMP_FIRE_OUT_RESET; age = 0; reason(meas); - assertFalse(rules[5].fired); + assertFalse(rules[4].fired); cancelAlert(false); @@ -322,7 +324,7 @@ reason(meas); assertTrue(50 == airgate); assertTrue(heaterStateOff == getHeaterState()); - assertFalse(rules[6].fired); + assertFalse(rules[5].fired); age = 0; dir = firing_up; @@ -331,7 +333,7 @@ reason(meas); assertTrue(100 == airgate); assertTrue(heaterStateUp == getHeaterState()); - assertTrue(rules[6].fired); + assertTrue(rules[5].fired); cancelAlert(false); @@ -564,7 +566,7 @@ static const char testAirgate50_P[] PROGMEM = "testAirgate50"; static const char testAirgate25_P[] PROGMEM = "testAirgate25"; static const char testAirgateClose_P[] PROGMEM = "testAirgateClose"; -static const char testTooRich_P[] PROGMEM = "testTooRich"; +// static const char testTooRich_P[] PROGMEM = "testTooRich"; static const char testTooLean_P[] PROGMEM = "testTooLean"; static const char testFireOut_P[] PROGMEM = "testFireOut"; static const char testWarmStart_P[] PROGMEM = "testWarmStart"; @@ -582,7 +584,7 @@ {class, testAirgate50_P, testAirgate50}, {class, testAirgate25_P, testAirgate25}, {class, testAirgateClose_P, testAirgateClose}, - {class, testTooRich_P, testTooRich}, + // {class, testTooRich_P, testTooRich}, {class, testTooLean_P, testTooLean}, {class, testFireOut_P, testFireOut}, {class, testWarmStart_P, testWarmStart}, diff --git a/lambda/TODO b/lambda/TODO index 8a62f5b..c615f43 100644 --- a/lambda/TODO +++ b/lambda/TODO @@ -1,11 +1,8 @@ * C -- Check other uses of const (return value?) -- Flexarray? http://en.wikipedia.org/wiki/Sizeof * AVR * Functionality -- Handle firing up again without reset * Circuit - AVCC should be connected to VCC via an LC network @@ -13,5 +10,5 @@ * Release/put in Makefile? - Makefile: LANG = 0 (1) - pins.h LCD pins (prototype) -- interrupts.h TIMER0_COMP_MATCH 122/244 (124/248) +- interrupts.h TIMER0_COMP_MATCH 122/244 (123/246) - sensors.h: SHUNT_MILLIOHMS 100 (111) \ No newline at end of file diff --git a/lambda/rules.c b/lambda/rules.c index 18291f0..59f85d8 100644 --- a/lambda/rules.c +++ b/lambda/rules.c @@ -69,8 +69,12 @@ } /** - * Notifies that the combustion is too rich and to open the air gate. + * Notifies that the combustion is too rich and suggests to open the air gate. + * Disabled because it does not seem to be a good idea to give more air when + * the combustion is rich as this doesn't really make it leaner and more heat + * appears to be thrown out through the chimney. */ +/* static void tooRich(bool* const fired, int8_t const dir, Measurement const meas) { if (meas.tempI > TEMP_FIRE_OUT && @@ -82,6 +86,7 @@ *fired = true; } } +*/ /** * Notifies that the combustion is lean (again) and to set the air gate to 50%. @@ -210,7 +215,7 @@ {false, airgate50}, {false, airgate25}, {false, airgateClose}, - {false, tooRich}, + // {false, tooRich}, {false, tooLean}, {false, fireOut}, {false, warmStart}