mirror of https://github.com/rusefi/rusefi-1.git
don't print the wrong number (#3158)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
This commit is contained in:
parent
bcd54a7cd9
commit
68e2b93dff
|
@ -643,8 +643,8 @@ struct EtbImpl final : public EtbController {
|
||||||
motor->set(0.5f);
|
motor->set(0.5f);
|
||||||
motor->enable();
|
motor->enable();
|
||||||
chThdSleepMilliseconds(1000);
|
chThdSleepMilliseconds(1000);
|
||||||
float primaryMax = Sensor::getRaw(functionToTpsSensorPrimary(myFunction)) * TPS_TS_CONVERSION;
|
float primaryMax = Sensor::getRaw(functionToTpsSensorPrimary(myFunction));
|
||||||
float secondaryMax = Sensor::getRaw(functionToTpsSensorSecondary(myFunction)) * TPS_TS_CONVERSION;
|
float secondaryMax = Sensor::getRaw(functionToTpsSensorSecondary(myFunction));
|
||||||
|
|
||||||
// Let it return
|
// Let it return
|
||||||
motor->set(0);
|
motor->set(0);
|
||||||
|
@ -653,8 +653,8 @@ struct EtbImpl final : public EtbController {
|
||||||
// Now grab closed
|
// Now grab closed
|
||||||
motor->set(-0.5f);
|
motor->set(-0.5f);
|
||||||
chThdSleepMilliseconds(1000);
|
chThdSleepMilliseconds(1000);
|
||||||
float primaryMin = Sensor::getRaw(functionToTpsSensorPrimary(myFunction)) * TPS_TS_CONVERSION;
|
float primaryMin = Sensor::getRaw(functionToTpsSensorPrimary(myFunction));
|
||||||
float secondaryMin = Sensor::getRaw(functionToTpsSensorSecondary(myFunction)) * TPS_TS_CONVERSION;
|
float secondaryMin = Sensor::getRaw(functionToTpsSensorSecondary(myFunction));
|
||||||
|
|
||||||
// Finally disable and reset state
|
// Finally disable and reset state
|
||||||
motor->disable();
|
motor->disable();
|
||||||
|
@ -668,17 +668,17 @@ struct EtbImpl final : public EtbController {
|
||||||
|
|
||||||
// Write out the learned values to TS, waiting briefly after setting each to let TS grab it
|
// Write out the learned values to TS, waiting briefly after setting each to let TS grab it
|
||||||
tsOutputChannels.calibrationMode = functionToCalModePriMax(myFunction);
|
tsOutputChannels.calibrationMode = functionToCalModePriMax(myFunction);
|
||||||
tsOutputChannels.calibrationValue = primaryMax;
|
tsOutputChannels.calibrationValue = primaryMax * TPS_TS_CONVERSION;
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
tsOutputChannels.calibrationMode = functionToCalModePriMin(myFunction);
|
tsOutputChannels.calibrationMode = functionToCalModePriMin(myFunction);
|
||||||
tsOutputChannels.calibrationValue = primaryMin;
|
tsOutputChannels.calibrationValue = primaryMin * TPS_TS_CONVERSION;
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
|
|
||||||
tsOutputChannels.calibrationMode = functionToCalModeSecMax(myFunction);
|
tsOutputChannels.calibrationMode = functionToCalModeSecMax(myFunction);
|
||||||
tsOutputChannels.calibrationValue = secondaryMax;
|
tsOutputChannels.calibrationValue = secondaryMax * TPS_TS_CONVERSION;
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
tsOutputChannels.calibrationMode = functionToCalModeSecMin(myFunction);
|
tsOutputChannels.calibrationMode = functionToCalModeSecMin(myFunction);
|
||||||
tsOutputChannels.calibrationValue = secondaryMin;
|
tsOutputChannels.calibrationValue = secondaryMin * TPS_TS_CONVERSION;
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
|
|
||||||
tsOutputChannels.calibrationMode = TsCalMode::None;
|
tsOutputChannels.calibrationMode = TsCalMode::None;
|
||||||
|
|
Loading…
Reference in New Issue