simpler SENT for now

This commit is contained in:
rusefillc 2022-11-19 09:38:39 -05:00
parent cff6d21157
commit e3bad2649e
4 changed files with 4 additions and 14 deletions

View File

@ -28,8 +28,6 @@ void setDefaultBaseEngine() {
engineConfiguration->compressionRatio = 9;
engineConfiguration->sentErrorRate = 0.03; // 3% error rate
engineConfiguration->turbochargerFilter = 0.01f;
engineConfiguration->fuelAlgorithm = LM_SPEED_DENSITY;

View File

@ -507,8 +507,6 @@ uint8_t sent_channel::crc6(uint32_t data)
static sent_channel channels[SENT_CHANNELS_NUM];
static float valueErrorRate = -1;
void sent_channel::Info(void)
{
int i;
@ -522,7 +520,6 @@ void sent_channel::Info(void)
if (GetSignals(&stat, &sig0, &sig1) == 0) {
efiPrintf("Last valid fast msg Status 0x%01x Sig0 0x%03x Sig1 0x%03x", stat, sig0, sig1);
}
efiPrintf("valueErrorRate %f", valueErrorRate);
if (scMsgFlags) {
efiPrintf("Slow channels:");
@ -610,14 +607,10 @@ float getSentValue(size_t index) {
sent_channel &ch = channels[index];
if (ch.GetSignals(NULL, &sig0, &sig1) == 0) {
float maxValue = 0xfff;
valueErrorRate = 1.0 - (sig0 + sig1) / maxValue;
if (absF(valueErrorRate) <= engineConfiguration->sentErrorRate) {
/* scale to 0.0 .. 1.0 */
return sig1 / maxValue;
}
// GM sig0 + sig1 == 0xfff but Ford does not
/* scale to 0.0 .. 1.0 */
return sig0;
}
}

View File

@ -1349,7 +1349,7 @@ custom stepper_num_micro_steps_e 1 bits, U08, @OFFSET@, [0:3], @@stepper_num_mic
int8_t launchFuelAdderPercent
int8_t[3 iterate] sorryUnused
float sentErrorRate;;"", 1, 0, 0, 3000, 2
int8_t[4 iterate] sorryUnusedF
int16_t coastingFuelCutRpmHigh;This sets the RPM above which fuel cut is active.;"rpm", 1, 0, 0, 5000, 0
int16_t coastingFuelCutRpmLow;This sets the RPM below which fuel cut is deactivated, this prevents jerking or issues transitioning to idle;"rpm", 1, 0, 0, 5000, 0

View File

@ -4119,7 +4119,6 @@ dialog = tcuControls, "Transmission Settings"
field = "boardUseD4PullDown", boardUseD4PullDown
field = "boardUseD5PullDown", boardUseD5PullDown
field = "SENT input 1", sentInputPins1
field = "sentErrorRate", sentErrorRate
dialog = parkingLot, "Experimental/Broken"
field = "I understand ECU Locking", yesUnderstandLocking