parent
3c8cd08c61
commit
a041eb55f3
|
@ -255,12 +255,11 @@ extern bool kAcRequestState;
|
|||
currentState = engine->engineState.lua.acRequestState;
|
||||
}
|
||||
AcController & acController = engine->module<AcController>().unmock();
|
||||
if (acController.acButtonState != currentState) {
|
||||
acController.acButtonState = currentState;
|
||||
if (engine->acButtonSwitchedState.update(currentState)) {
|
||||
acController.acSwitchLastChangeTimeMs = US2MS(getTimeNowUs());
|
||||
}
|
||||
}
|
||||
engine->engineState.clutchUpState = getClutchUpState();
|
||||
engine->clutchUpSwitchedState.update(getClutchUpState());
|
||||
|
||||
#if EFI_IDLE_CONTROL
|
||||
if (isBrainPinValid(engineConfiguration->throttlePedalUpPin)) {
|
||||
|
@ -268,7 +267,7 @@ extern bool kAcRequestState;
|
|||
}
|
||||
#endif // EFI_IDLE_CONTROL
|
||||
|
||||
engine->engineState.brakePedalState = getBrakePedalState();
|
||||
engine->brakePedalSwitchedState.update(getBrakePedalState());
|
||||
|
||||
#endif // EFI_GPIO_HARDWARE
|
||||
}
|
||||
|
|
|
@ -54,6 +54,15 @@ void sendEventCounters() {
|
|||
#endif // EFI_SHAFT_POSITION_INPUT
|
||||
}
|
||||
|
||||
void sendButtonCounters() {
|
||||
CanTxMessage msg(CanCategory::BENCH_TEST, BENCH_TEST_BUTTON_COUNTERS, 8);
|
||||
msg[0] = TRUNCATE_TO_BYTE(engine->engineState.brakePedalState.getCounter());
|
||||
msg[1] = TRUNCATE_TO_BYTE(engine->engineState.clutchUpState.getCounter());
|
||||
|
||||
AcController &acController = engine->module<AcController>().unmock();
|
||||
msg[2] = TRUNCATE_TO_BYTE(acController.acButtonState.getCounter());
|
||||
}
|
||||
|
||||
void sendRawAnalogValues() {
|
||||
const float values[RAW_ANALOG_VALUES_COUNT] = {
|
||||
Sensor::getRaw(SensorType::Tps1Primary),
|
||||
|
|
|
@ -7,5 +7,6 @@
|
|||
|
||||
void processCanBenchTest(const CANRxFrame& frame);
|
||||
void sendEventCounters();
|
||||
void sendButtonCounters();
|
||||
void sendRawAnalogValues();
|
||||
void sendBoardStatus();
|
||||
|
|
|
@ -62,6 +62,7 @@ void CanWrite::PeriodicTask(efitick_t nowNt) {
|
|||
|
||||
if (cycle.isInterval(CI::_250ms)) {
|
||||
sendBoardStatus();
|
||||
sendButtonCounters();
|
||||
}
|
||||
|
||||
#if EFI_WIDEBAND_FIRMWARE_UPDATE
|
||||
|
|
Loading…
Reference in New Issue