cleanup for #102

(cherry picked from commit be43ac80b64838450884f61dfc9bca315d2ec756)
This commit is contained in:
Matthew Kennedy 2023-05-07 01:39:09 -07:00 committed by rusefi
parent 8624d1ccf0
commit a3afc7bfe0
1 changed files with 4 additions and 5 deletions

View File

@ -59,12 +59,11 @@ void applyIACposition(percent_t position) {
if (!engineConfiguration->isDoubleSolenoidIdle) {
idleSolenoidOpen.setSimplePwmDutyCycle(duty);
} else {
/* use 0.01..0.99 range */
float idle_range = 0.98; /* move to config? */
float idle_open, idle_close;
// use 0.01..0.99 range
float idle_range = 0.98; // move to config?
idle_open = 0.01 + idle_range * duty;
idle_close = 0.01 + idle_range * (1.0 - duty);
float idle_open = 0.01 + idle_range * duty;
float idle_close = 0.01 + idle_range * (1.0 - duty);
idleSolenoidOpen.setSimplePwmDutyCycle(idle_open);
idleSolenoidClose.setSimplePwmDutyCycle(idle_close);