mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-11 02:34:29 +05:00
fix: added `nodemcu_32_160mhz` env, deadband usage in PID fixed (#176)
* Small fixes: CPU limit for odemcu_32, deadbamd usage in PID * PR review fixes * Fix: remove spaces --------- Co-authored-by: Edward Zhuravlov <Edward.Zhuravlev@topsoft.by>
This commit is contained in:
@@ -294,6 +294,10 @@ build_flags =
|
|||||||
check_tool = ${esp32_defaults.check_tool}
|
check_tool = ${esp32_defaults.check_tool}
|
||||||
check_flags = ${esp32_defaults.check_flags}
|
check_flags = ${esp32_defaults.check_flags}
|
||||||
|
|
||||||
|
[env:nodemcu_32_160mhz]
|
||||||
|
extends = env:nodemcu_32
|
||||||
|
board_build.f_cpu = 160000000L ; set frequency to 160MHz
|
||||||
|
|
||||||
[env:d1_mini32]
|
[env:d1_mini32]
|
||||||
platform = ${esp32_defaults.platform}
|
platform = ${esp32_defaults.platform}
|
||||||
platform_packages = ${esp32_defaults.platform_packages}
|
platform_packages = ${esp32_defaults.platform_packages}
|
||||||
|
|||||||
@@ -213,7 +213,8 @@ protected:
|
|||||||
}*/
|
}*/
|
||||||
|
|
||||||
float error = pidRegulator.setpoint - pidRegulator.input;
|
float error = pidRegulator.setpoint - pidRegulator.input;
|
||||||
bool hasDeadband = (error > -(settings.pid.deadband.thresholdHigh))
|
bool hasDeadband = settings.pid.deadband.enabled
|
||||||
|
&& (error > -(settings.pid.deadband.thresholdHigh))
|
||||||
&& (error < settings.pid.deadband.thresholdLow);
|
&& (error < settings.pid.deadband.thresholdLow);
|
||||||
|
|
||||||
if (hasDeadband) {
|
if (hasDeadband) {
|
||||||
|
|||||||
Reference in New Issue
Block a user