Closed MauAbata closed 3 years ago
https://github.com/MausTec/nogasm-wifi/blob/master/src/OrgasmControl.cpp#L53-L54
This is where the speed ramps up, so to implement motor_min_speed here you'd do something like
if (motor_speed < 0) {
motor_speed = Config.motor_min_speed;
} else {
motor_speed += motor_increment;
}
Though it'd be a bit more complicated--right now we need to check if the current speed is < 0, and the new speed >= 0. So that should actually be:
auto new_speed = motor_speed + motor_increment;
if (motor_speed < 0 && new_speed >= 0) {
// Zero crossing / turn on detected
motor_speed = Config.motor_min_speed;
} else {
motor_speed = new_speed;
}
Potentially fixed in my PR