Original Version of STM Board

Dependencies:   FastPWM mbed

Revision:
58:2eade98630e2
Parent:
57:f4819de54e7a
Child:
60:64181f1d3e60
diff -r f4819de54e7a -r 2eade98630e2 function_utilities/function_utilities.cpp
--- a/function_utilities/function_utilities.cpp	Fri Mar 06 12:14:38 2020 +0000
+++ b/function_utilities/function_utilities.cpp	Mon Mar 09 12:43:04 2020 +0000
@@ -202,8 +202,8 @@
 float CUR_PRES_B_mean = 0.0f;
 float CUR_TORQUE_sum = 0.0f;
 float CUR_TORQUE_mean = 0.0f;
-float PRES_A_NULL = 2048.0f;
-float PRES_B_NULL = 1.0f;
+float PRES_A_NULL = 300.0f;
+float PRES_B_NULL = 300.0f;
 float TORQUE_NULL = 3900.0f;
 
 float Ref_Valve_Pos_Old = 0.0f;
@@ -412,7 +412,7 @@
     //writer.write(RID_VALVE_LIMIT_MINUS,(int) VALVE_LIMIT_MINUS);
     //writer.write(RID_VALVE_LIMIT_PLUS,(int) VALVE_LIMIT_PLUS);
     writer.write(RID_ENC_PULSE_PER_POSITION,(int) (ENC_PULSE_PER_POSITION*10.0f));
-    writer.write(RID_TORQUE_SENSOR_PULSE_PER_TORQUE,(int) (TORQUE_SENSOR_PULSE_PER_TORQUE * 100.0f));
+    writer.write(RID_TORQUE_SENSOR_PULSE_PER_TORQUE,(int) (TORQUE_SENSOR_PULSE_PER_TORQUE * 10000.0f));
     writer.write(RID_PRES_SENSOR_A_PULSE_PER_BAR,(int) (PRES_SENSOR_A_PULSE_PER_BAR * 100.0f));
     writer.write(RID_PRES_SENSOR_B_PULSE_PER_BAR,(int) (PRES_SENSOR_B_PULSE_PER_BAR * 100.0f));
     writer.write(RID_FRICTION,(int) (FRICTION * 10.0f));
@@ -495,7 +495,7 @@
     //VALVE_LIMIT_PLUS = flashReadInt(Rom_Sector, RID_VALVE_LIMIT_PLUS);
     ENC_PULSE_PER_POSITION = (float) (flashReadInt(Rom_Sector, RID_ENC_PULSE_PER_POSITION)) * 0.1f;
 //    ENC_PULSE_PER_POSITION = (float) 1024.0f;
-    TORQUE_SENSOR_PULSE_PER_TORQUE = (float) (flashReadInt(Rom_Sector, RID_TORQUE_SENSOR_PULSE_PER_TORQUE)) * 0.01f;
+    TORQUE_SENSOR_PULSE_PER_TORQUE = (float) (flashReadInt(Rom_Sector, RID_TORQUE_SENSOR_PULSE_PER_TORQUE)) * 0.0001f;
     //TORQUE_SENSOR_PULSE_PER_TORQUE = (float) 0.41928f; //for ankle
 //    TORQUE_SENSOR_PULSE_PER_TORQUE = (float) 10000.0f/2048.0f; //for knee
     PRES_SENSOR_A_PULSE_PER_BAR = (float) (flashReadInt(Rom_Sector, RID_PRES_SENSOR_A_PULSE_PER_BAR)) * 0.01f;