![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Original Version of STM Board
Diff: main.cpp
- Revision:
- 101:50159049a518
- Parent:
- 100:ac788a23ab07
- Child:
- 102:9a66b31af366
--- a/main.cpp Tue Sep 08 01:14:04 2020 +0000 +++ b/main.cpp Tue Sep 08 06:50:02 2020 +0000 @@ -430,8 +430,9 @@ } output = 1.0f/(1.0f+exp(-output)); + output_normalized = output; output = output * 20000.0f - 10000.0f; - output_normalized = output; + if(output>=0) { valve_pos.ref = output*0.0001f*((double)VALVE_MAX_POS - (double) VALVE_CENTER) + (double) VALVE_CENTER; } else {