migrating to SensorType::Rpm API
This commit is contained in:
parent
16b3e95865
commit
3b6ecb432b
|
@ -404,8 +404,8 @@ void canDashboardBMWE90(CanCycle cycle)
|
|||
rpmcounter = 0xF0;
|
||||
CanTxMessage msg(E90_RPM, 3);
|
||||
msg[0] = rpmcounter;
|
||||
msg[1] = (Sensor::getOrZero(SensorType::Rpm) * 4) & 0xFF;
|
||||
msg[2] = (Sensor::getOrZero(SensorType::Rpm) * 4) >> 8;
|
||||
msg[1] = ((int)(Sensor::getOrZero(SensorType::Rpm)) * 4) & 0xFF;
|
||||
msg[2] = ((int)(Sensor::getOrZero(SensorType::Rpm)) * 4) >> 8;
|
||||
}
|
||||
|
||||
{ //oil & coolant temp (all in C, despite gauge being F)
|
||||
|
|
|
@ -144,7 +144,7 @@ static void showLine(lcd_line_e line, int /*screenY*/) {
|
|||
case LL_RPM:
|
||||
{
|
||||
int seconds = minI(9999, getTimeNowSeconds());
|
||||
lcdPrintf("RPM %d %d ", GET_RPM(), seconds);
|
||||
lcdPrintf("RPM %d %d ", (int)Sensor::getOrZero(SensorType::Rpm), seconds);
|
||||
}
|
||||
#if EFI_FILE_LOGGING
|
||||
{
|
||||
|
@ -300,7 +300,7 @@ void updateHD44780lcd(void) {
|
|||
// }
|
||||
// lcd_HD44780_set_position(0, 10);
|
||||
//
|
||||
// char * ptr = itoa10(buffer, GET_RPM());
|
||||
// char * ptr = itoa10(buffer, Sensor::getOrZero(SensorType::Rpm));
|
||||
// ptr[0] = 0;
|
||||
// int len = ptr - buffer;
|
||||
// for (int i = 0; i < 6 - len; i++) {
|
||||
|
|
|
@ -91,7 +91,7 @@ ClosedLoopFuelResult fuelClosedLoopCorrection() {
|
|||
return {};
|
||||
}
|
||||
|
||||
size_t binIdx = computeStftBin(GET_RPM(), getFuelingLoad(), engineConfiguration->stft);
|
||||
size_t binIdx = computeStftBin(Sensor::getOrZero(SensorType::Rpm), getFuelingLoad(), engineConfiguration->stft);
|
||||
|
||||
#if EFI_TUNER_STUDIO
|
||||
engine->outputChannels.fuelClosedLoopBinIdx = binIdx;
|
||||
|
|
|
@ -22,7 +22,7 @@ static void updateVrPwm(int rpm, size_t index) {
|
|||
}
|
||||
|
||||
void updateVrPwm() {
|
||||
auto rpm = GET_RPM();
|
||||
auto rpm = Sensor::getOrZero(SensorType::Rpm);
|
||||
|
||||
for (size_t i = 0; i < efi::size(engineConfiguration->vrThreshold); i++) {
|
||||
updateVrPwm(rpm, i);
|
||||
|
|
|
@ -192,7 +192,7 @@ static void reportWave(Logging *logging, int index) {
|
|||
logging->appendPrintf("%s", LOG_DELIMITER);
|
||||
|
||||
uint32_t offsetUs = getWaveOffset(index);
|
||||
int rpm = GET_RPM();
|
||||
int rpm = Sensor::getOrZero(SensorType::Rpm);
|
||||
if (rpm != 0) {
|
||||
float oneDegreeUs = getOneDegreeTimeUs(rpm);
|
||||
|
||||
|
|
|
@ -448,7 +448,7 @@ static msg_t hipThread(void *arg) {
|
|||
msg_t msg;
|
||||
|
||||
/* load new/updated settings */
|
||||
instance.handleSettings(GET_RPM() DEFINE_PARAM_SUFFIX(PASS_HIP_PARAMS));
|
||||
instance.handleSettings(Sensor::getOrZero(SensorType::Rpm) DEFINE_PARAM_SUFFIX(PASS_HIP_PARAMS));
|
||||
/* in advanced more driver will set channel while reading integrator value */
|
||||
if (!instance.adv_mode) {
|
||||
/* switch input channel */
|
||||
|
|
Loading…
Reference in New Issue