Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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 {