Susol Breaker
This commit is contained in:
@@ -44,7 +44,7 @@ float SingleValueStrategy::execute(float currentValue) {
|
||||
|
||||
int noiseInt = rand() % 201;
|
||||
noiseInt -= 100;
|
||||
float noise = (noiseInt / 100) * _noiseMagnitude;
|
||||
float noise = (static_cast<float>(noiseInt) / 100) * _noiseMagnitude;
|
||||
Serial.println("Single value strategy with noise.");
|
||||
return _setpoint + noise;
|
||||
}
|
||||
Reference in New Issue
Block a user