Skip to content

Commit

Permalink
dead console ETB direct control (#512)
Browse files Browse the repository at this point in the history
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
  • Loading branch information
rusefillc authored Nov 14, 2024
1 parent 4408fbc commit a4e6d0a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 37 deletions.
32 changes: 0 additions & 32 deletions firmware/controllers/actuators/electronic_throttle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,6 @@ static TsCalMode functionToCalModeSecMax(dc_function_e func) {
}
#endif // EFI_TUNER_STUDIO

static percent_t directPwmValue = NAN;

#define ETB_DUTY_LIMIT 0.9
// this macro clamps both positive and negative percentages from about -100% to 100%
#define ETB_PERCENT_TO_DUTY(x) (clampF(-ETB_DUTY_LIMIT, 0.01f * (x), ETB_DUTY_LIMIT))
Expand Down Expand Up @@ -584,12 +582,6 @@ void EtbController::update() {
}
#endif // EFI_UNIT_TEST

if (!cisnan(directPwmValue)) {
m_motor->set(directPwmValue);
etbErrorCode = (int8_t)TpsState::Manual;
return;
}

bool isOk = checkStatus();

if (!isOk) {
Expand Down Expand Up @@ -730,30 +722,6 @@ void etbPidReset() {
}
}

#if !EFI_UNIT_TEST

/**
* At the moment there are TWO ways to use this
* set_etb_duty X
* set etb X
* manual duty cycle control without PID. Percent value from 0 to 100
*/
void setThrottleDutyCycle(percent_t level) {
efiPrintf("setting ETB duty=%f%%", level);
if (std::isnan(level)) {
directPwmValue = NAN;
return;
}

float dc = ETB_PERCENT_TO_DUTY(level);
directPwmValue = dc;
for (int i = 0 ; i < ETB_COUNT; i++) {
setDcMotorDuty(i, dc);
}
efiPrintf("duty ETB duty=%f", dc);
}
#endif /* EFI_PROD_CODE */

void etbAutocal(size_t throttleIndex) {
if (throttleIndex >= ETB_COUNT) {
return;
Expand Down
1 change: 0 additions & 1 deletion firmware/controllers/actuators/electronic_throttle.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ void setBoschVAGETB();
void setDefaultEtbBiasCurve();
void setDefaultEtbParameters();
void setBoschVNH2SP30Curve();
void setThrottleDutyCycle(percent_t level);
void onConfigurationChangeElectronicThrottleCallback(engine_configuration_s *previousConfiguration);
void unregisterEtbPins();
void setProteusHitachiEtbDefaults();
Expand Down
4 changes: 0 additions & 4 deletions firmware/controllers/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,6 @@ const command_f_s commandsF[] = {
{"cranking_timing_angle", setCrankingTimingAngle},
#endif // EFI_ENGINE_CONTROL

#if EFI_ELECTRONIC_THROTTLE_BODY
{"etb", setThrottleDutyCycle},
#endif // EFI_ELECTRONIC_THROTTLE_BODY

};

const command_i_s commandsI[] = {{"ignition_mode", setIgnitionMode},
Expand Down

0 comments on commit a4e6d0a

Please sign in to comment.