NB2 hellen-72-rev-d something is off #2958
This commit is contained in:
parent
a2a4a676bb
commit
841875fb94
|
@ -42,6 +42,7 @@ void CsvReader::processLine(EngineTestHelper *eth) {
|
||||||
|
|
||||||
char *timeStampstr = trim(strtok(line, s));
|
char *timeStampstr = trim(strtok(line, s));
|
||||||
bool newState[2];
|
bool newState[2];
|
||||||
|
bool newVvtState[CAM_INPUTS_COUNT];
|
||||||
char *firstToken = trim(strtok(NULL, s));
|
char *firstToken = trim(strtok(NULL, s));
|
||||||
char *secondToken = trim(strtok(NULL, s));
|
char *secondToken = trim(strtok(NULL, s));
|
||||||
|
|
||||||
|
@ -55,6 +56,11 @@ void CsvReader::processLine(EngineTestHelper *eth) {
|
||||||
newState[columnIndeces[1]] = secondToken[0] == '1';
|
newState[columnIndeces[1]] = secondToken[0] == '1';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// todo: start reading states much smarter, start reading all 4 cam channels!
|
||||||
|
if (m_vvtCount > 0) {
|
||||||
|
newVvtState[0] = secondToken[0] == '1';
|
||||||
|
}
|
||||||
|
|
||||||
double timeStamp = std::stod(timeStampstr);
|
double timeStamp = std::stod(timeStampstr);
|
||||||
|
|
||||||
timeStamp += m_timestampOffset;
|
timeStamp += m_timestampOffset;
|
||||||
|
@ -70,6 +76,19 @@ void CsvReader::processLine(EngineTestHelper *eth) {
|
||||||
|
|
||||||
currentState[index] = newState[index];
|
currentState[index] = newState[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (int vvtIndex = 0; vvtIndex < m_vvtCount ; vvtIndex++) {
|
||||||
|
if (currentVvtState[vvtIndex] == newVvtState[vvtIndex]) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
efitick_t nowNt = getTimeNowNt();
|
||||||
|
trigger_value_e event = newVvtState[vvtIndex] ? TV_RISE : TV_FALL;
|
||||||
|
hwHandleVvtCamSignal(event, nowNt, vvtIndex PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
|
currentVvtState[vvtIndex] == newVvtState[vvtIndex];
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CsvReader::readLine(EngineTestHelper *eth) {
|
void CsvReader::readLine(EngineTestHelper *eth) {
|
||||||
|
|
|
@ -32,6 +32,7 @@ private:
|
||||||
char buffer[255];
|
char buffer[255];
|
||||||
|
|
||||||
bool currentState[2];
|
bool currentState[2];
|
||||||
|
bool currentVvtState[CAM_INPUTS_COUNT];
|
||||||
|
|
||||||
int m_lineIndex = -1;
|
int m_lineIndex = -1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue