auto-sync
This commit is contained in:
parent
95eec26d5f
commit
45314067c4
|
@ -224,7 +224,7 @@ static void setPinState(const char * msg, OutputPin *pin, LEElement *element, En
|
||||||
if (value != pin->getLogicValue()) {
|
if (value != pin->getLogicValue()) {
|
||||||
if (isRunningBenchTest())
|
if (isRunningBenchTest())
|
||||||
return; // let's not mess with bench testing
|
return; // let's not mess with bench testing
|
||||||
scheduleMsg(logger, "setting %s %s", msg, boolToString(value));
|
scheduleMsg(logger, "setPin %s %s", msg, boolToString(value));
|
||||||
pin->setValue(value);
|
pin->setValue(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -347,9 +347,9 @@ void runFsio(void) {
|
||||||
setPinState("A/C", &enginePins.acRelay, acRelayLogic, engine);
|
setPinState("A/C", &enginePins.acRelay, acRelayLogic, engine);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (boardConfiguration->alternatorControlPin != GPIO_UNASSIGNED) {
|
// if (boardConfiguration->alternatorControlPin != GPIO_UNASSIGNED) {
|
||||||
setPinState("alternator", &enginePins.alternatorField, alternatorLogic, engine);
|
// setPinState("alternator", &enginePins.alternatorField, alternatorLogic, engine);
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (boardConfiguration->fanPin != GPIO_UNASSIGNED) {
|
if (boardConfiguration->fanPin != GPIO_UNASSIGNED) {
|
||||||
setPinState("fan", &enginePins.fanRelay, radiatorFanLogic, engine);
|
setPinState("fan", &enginePins.fanRelay, radiatorFanLogic, engine);
|
||||||
|
|
|
@ -48,7 +48,7 @@ typedef struct {
|
||||||
OutputPin acRelay;
|
OutputPin acRelay;
|
||||||
OutputPin fuelPumpRelay;
|
OutputPin fuelPumpRelay;
|
||||||
OutputPin o2heater;
|
OutputPin o2heater;
|
||||||
OutputPin alternatorField;
|
// OutputPin alternatorField;
|
||||||
OutputPin errorLedPin;
|
OutputPin errorLedPin;
|
||||||
|
|
||||||
NamedOutputPin injectors[ENGINE_CHANNEL_COUNT];
|
NamedOutputPin injectors[ENGINE_CHANNEL_COUNT];
|
||||||
|
|
|
@ -45,4 +45,8 @@ void testPidController(void) {
|
||||||
assertEquals(90, pid.getValue(14, 12, 0.1));
|
assertEquals(90, pid.getValue(14, 12, 0.1));
|
||||||
|
|
||||||
|
|
||||||
|
assertEquals(10, pid.getValue(14, 16, 0.1));
|
||||||
|
assertEquals(10, pid.getValue(14, 16, 1));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue