fix #404
This commit is contained in:
parent
1f2b6dc5fc
commit
4f647c601c
|
@ -1838,11 +1838,11 @@ typedef enum {
|
|||
CUSTOM_ERR_PIN_ALREADY_USED_2 = 6134,
|
||||
CUSTOM_ERR_ICU_STATE = 6135,
|
||||
CUSTOM_ERR_TCHARGE_NOT_READY = 6136,
|
||||
CUSTOM_ERR_6137 = 6137,
|
||||
CUSTOM_ERR_TRIGGER_SHAPE_TOO_LONG = 6137,
|
||||
CUSTOM_ERR_FUEL_TABLE_NOT_READY = 6138,
|
||||
CUSTOM_ERR_TCHARGE_NOT_READY2 = 6139,
|
||||
|
||||
CUSTOM_ERR_6140 = 6140,
|
||||
CUSTOM_ERR_COMMAND_LOWER_CASE_EXPECTED = 6140,
|
||||
CUSTOM_ERR_FLASH_CRC_FAILED = 6141,
|
||||
CUSTOM_ERR_NOT_INPUT_PIN = 6142,
|
||||
CUSTOM_ERR_SKIPPED_TOOTH_SHAPE = 6143,
|
||||
|
|
|
@ -50,15 +50,21 @@ void TriggerShape::calculateTriggerSynchPoint(TriggerState *state DECLARE_ENGINE
|
|||
|
||||
triggerShapeSynchPointIndex = findTriggerZeroEventIndex(state, this, triggerConfig PASS_ENGINE_PARAMETER);
|
||||
|
||||
engine->engineCycleEventCount = getLength();
|
||||
efiAssertVoid(engine->engineCycleEventCount > 0, "shapeLength=0");
|
||||
int length = getLength();
|
||||
engine->engineCycleEventCount = length;
|
||||
efiAssertVoid(length > 0, "shapeLength=0");
|
||||
if (length >= PWM_PHASE_MAX_COUNT) {
|
||||
warning(CUSTOM_ERR_TRIGGER_SHAPE_TOO_LONG, "Count above %d", length);
|
||||
shapeDefinitionError = true;
|
||||
return;
|
||||
}
|
||||
|
||||
float firstAngle = getAngle(triggerShapeSynchPointIndex);
|
||||
assertAngleRange(triggerShapeSynchPointIndex, "firstAngle");
|
||||
|
||||
int frontOnlyIndex = 0;
|
||||
|
||||
for (int eventIndex = 0; eventIndex < engine->engineCycleEventCount; eventIndex++) {
|
||||
for (int eventIndex = 0; eventIndex < length; eventIndex++) {
|
||||
if (eventIndex == 0) {
|
||||
// explicit check for zero to avoid issues where logical zero is not exactly zero due to float nature
|
||||
eventAngles[0] = 0;
|
||||
|
|
|
@ -251,5 +251,5 @@ int getRusEfiVersion(void) {
|
|||
return 123; // this is here to make the compiler happy about the unused array
|
||||
if (UNUSED_CCM_SIZE[0] * 0 != 0)
|
||||
return 3211; // this is here to make the compiler happy about the unused array
|
||||
return 20170502;
|
||||
return 20170505;
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ static void doAddAction(const char *token, action_type_e type, Void callback, vo
|
|||
for (int i = 0; i< efiStrlen(token);i++) {
|
||||
char ch = token[i];
|
||||
if (ch != mytolower(ch)) {
|
||||
firmwareError(CUSTOM_ERR_6140, "lowerCase expected [%s]", token);
|
||||
firmwareError(CUSTOM_ERR_COMMAND_LOWER_CASE_EXPECTED, "lowerCase expected [%s]", token);
|
||||
}
|
||||
}
|
||||
current->token = token;
|
||||
|
|
Loading…
Reference in New Issue