parent
3f537a66fa
commit
28c3af682d
|
@ -45,3 +45,6 @@ bool isTps2Error() {
|
||||||
bool isPedalError() {
|
bool isPedalError() {
|
||||||
return !Sensor::get(SensorType::AcceleratorPedal).Valid && Sensor::hasSensor(SensorType::AcceleratorPedalPrimary);
|
return !Sensor::get(SensorType::AcceleratorPedal).Valid && Sensor::hasSensor(SensorType::AcceleratorPedalPrimary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void sentTpsDecode() {
|
||||||
|
}
|
|
@ -29,6 +29,8 @@ void grabTPSIsWideOpen();
|
||||||
void grabPedalIsUp();
|
void grabPedalIsUp();
|
||||||
void grabPedalIsWideOpen();
|
void grabPedalIsWideOpen();
|
||||||
|
|
||||||
|
void sentTpsDecode();
|
||||||
|
|
||||||
bool isTps1Error();
|
bool isTps1Error();
|
||||||
bool isTps2Error();
|
bool isTps2Error();
|
||||||
bool isPedalError();
|
bool isPedalError();
|
||||||
|
|
|
@ -580,6 +580,7 @@ static void SentDecoderThread(void*) {
|
||||||
|
|
||||||
|
|
||||||
/* Call high level decoder from here */
|
/* Call high level decoder from here */
|
||||||
|
sentTpsDecode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -203,10 +203,15 @@ void initTps() {
|
||||||
tpsSecondaryMaximum = 20;
|
tpsSecondaryMaximum = 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (isDigitalTps1()) {
|
||||||
|
sentTps.Register();
|
||||||
|
} else {
|
||||||
analogTps1.init(isFordTps, &fordTps1, tpsSecondaryMaximum,
|
analogTps1.init(isFordTps, &fordTps1, tpsSecondaryMaximum,
|
||||||
{ engineConfiguration->tps1_1AdcChannel, (float)engineConfiguration->tpsMin, (float)engineConfiguration->tpsMax, min, max },
|
{ engineConfiguration->tps1_1AdcChannel, (float)engineConfiguration->tpsMin, (float)engineConfiguration->tpsMax, min, max },
|
||||||
{ engineConfiguration->tps1_2AdcChannel, (float)engineConfiguration->tps1SecondaryMin, (float)engineConfiguration->tps1SecondaryMax, min, max }
|
{ engineConfiguration->tps1_2AdcChannel, (float)engineConfiguration->tps1SecondaryMin, (float)engineConfiguration->tps1SecondaryMax, min, max }
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
tps2.init(isFordTps, &fordTps2, tpsSecondaryMaximum,
|
tps2.init(isFordTps, &fordTps2, tpsSecondaryMaximum,
|
||||||
{ engineConfiguration->tps2_1AdcChannel, (float)engineConfiguration->tps2Min, (float)engineConfiguration->tps2Max, min, max },
|
{ engineConfiguration->tps2_1AdcChannel, (float)engineConfiguration->tps2Min, (float)engineConfiguration->tps2Max, min, max },
|
||||||
|
|
Loading…
Reference in New Issue