progress or maybe even a fix of logging?

This commit is contained in:
rusefillc 2022-08-25 22:24:35 -04:00
parent 733f9b4659
commit 67055c69bf
4 changed files with 5 additions and 8 deletions

View File

@ -324,13 +324,13 @@ void Engine::updateSwitchInputs() {
acController.acSwitchLastChangeTimeMs = US2MS(getTimeNowUs());
}
}
engine->clutchUpState = getClutchUpState();
engine->engineState.clutchUpState = getClutchUpState();
if (isBrainPinValid(engineConfiguration->throttlePedalUpPin)) {
engine->module<IdleController>().unmock().throttlePedalUpState = efiReadPin(engineConfiguration->throttlePedalUpPin);
}
engine->brakePedalState = getBrakePedalState();
engine->engineState.brakePedalState = getBrakePedalState();
#endif // EFI_GPIO_HARDWARE
}

View File

@ -356,9 +356,6 @@ public:
void updateSwitchInputs();
void updateTriggerWaveform();
bool clutchUpState = false;
bool brakePedalState = false;
bool isRunningPwmTest = false;
/**

View File

@ -286,8 +286,8 @@ static int lua_getDigital(lua_State* l) {
switch (idx) {
case 0: state = engine->engineState.clutchDownState; break;
case 1: state = engine->clutchUpState; break;
case 2: state = engine->brakePedalState; break;
case 1: state = engine->engineState.clutchUpState; break;
case 2: state = engine->engineState.brakePedalState; break;
case 3: state = engine->module<AcController>().unmock().acButtonState; break;
default:
// Return nil to indicate invalid parameter

View File

@ -129,7 +129,7 @@ void printConfiguration(const engine_configuration_s *engineConfiguration) {
boolToString(engineConfiguration->isCylinderCleanupEnabled));
efiPrintf("clutchUp@%s: %s", hwPortname(engineConfiguration->clutchUpPin),
boolToString(engine->clutchUpState));
boolToString(engine->engineState.clutchUpState));
efiPrintf("clutchDown@%s: %s", hwPortname(engineConfiguration->clutchDownPin),
boolToString(engine->engineState.clutchDownState));