We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6790aa9 commit 6d93dcaCopy full SHA for 6d93dca
src/sensors/HallSensor.cpp
@@ -118,7 +118,7 @@ float HallSensor::getVelocity(){
118
} else {
119
float vel = direction * (_2PI / (float)cpr) / (pulse_diff / 1000000.0f);
120
// quick fix https://github.com/simplefoc/Arduino-FOC/issues/192
121
- if(vel < -velocity_max || vel > velocity_max) vel = 0f; //if velocity is out of range then make it zero
+ if(vel < -velocity_max || vel > velocity_max) vel = 0.0f; //if velocity is out of range then make it zero
122
return vel;
123
}
124
0 commit comments