Skip to content

Commit

Permalink
Mitsubishi 3A92 Support - 3 cylinder #4011
Browse files Browse the repository at this point in the history
  • Loading branch information
rusefillc committed Mar 19, 2022
1 parent d72c604 commit b845073
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion firmware/controllers/core/state_sequence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,16 @@
#include "trigger_structure.h"

void MultiChannelStateSequence::checkSwitchTimes(const float scale) const {
efiAssertVoid(CUSTOM_ERR_WAVE_1, phaseCount > 0, "StateSequence cannot be empty");
if (getSwitchTime(phaseCount - 1) != 1) {
firmwareError(CUSTOM_ERR_WAVE_1, "last switch time has to be 1/%f not %.2f/%f",
#if EFI_UNIT_TESTS
for (int index = 0;index < phaseCount;index ++) {
printf("switch time index=%d angle=%f\n", index, getSwitchTime(index));
}
#endif // EFI_UNIT_TESTS

firmwareError(CUSTOM_ERR_WAVE_1, "[count=%d] last switch time has to be 1/%f not %.2f/%f",
phaseCount,
scale, getSwitchTime(phaseCount - 1),
scale * getSwitchTime(phaseCount - 1));
return;
Expand Down

0 comments on commit b845073

Please sign in to comment.