eeprom_test

Dependencies:   mbed FastPWM

Revision:
67:cfc88fd0591e
Parent:
66:d385a08132d7
--- a/function_utilities/function_utilities.cpp	Thu May 21 02:08:49 2020 +0000
+++ b/function_utilities/function_utilities.cpp	Wed Jun 03 08:46:45 2020 +0000
@@ -376,7 +376,7 @@
 {
     FlashWriter writer(6);//2부터 7까지 되는듯 아마 sector
     if (!writer.ready()) writer.open();
-//    BNO = 10;
+//    BNO = 11;
     writer.write(RID_BNO,(int) BNO);           // write at address, 쓸때도 4byte씩 씀
     writer.write(RID_OPERATING_MODE,(int) OPERATING_MODE);
     writer.write(RID_SENSING_MODE, (int) SENSING_MODE);
@@ -457,9 +457,10 @@
 void ROM_CALL_DATA(void)
 {
     BNO = flashReadInt(Rom_Sector, RID_BNO);
-    //BNO = 11;
+//    BNO = 11;
     OPERATING_MODE = flashReadInt(Rom_Sector, RID_OPERATING_MODE);
     SENSING_MODE = flashReadInt(Rom_Sector, RID_SENSING_MODE);
+    SENSING_MODE = 1;
     CURRENT_CONTROL_MODE = flashReadInt(Rom_Sector, RID_CURRENT_CONTROL_MODE);
     CURRENT_CONTROL_MODE = 1;
     FLAG_VALVE_DEADZONE = flashReadInt(Rom_Sector, RID_FLAG_VALVE_DEADZONE);
@@ -505,9 +506,9 @@
     //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;
-//    PRES_SENSOR_A_PULSE_PER_BAR = 4096.0f / 200.0f;
+    PRES_SENSOR_A_PULSE_PER_BAR = 4096.0f * 946.0f / 3.3f / 300.0f / 210.0f;
     PRES_SENSOR_B_PULSE_PER_BAR = (float) (flashReadInt(Rom_Sector, RID_PRES_SENSOR_B_PULSE_PER_BAR)) * 0.01f;
-//    PRES_SENSOR_B_PULSE_PER_BAR = 4096.0f / 200.0f;
+    PRES_SENSOR_B_PULSE_PER_BAR = 4096.0f * 946.0f / 3.3f / 300.0f / 210.0f;
     FRICTION = (float) (flashReadInt(Rom_Sector, RID_FRICTION)) * 0.1f;
     HOMEPOS_OFFSET = flashReadInt(Rom_Sector, RID_HOMEPOS_OFFSET);
     HOMEPOS_VALVE_OPENING = flashReadInt(Rom_Sector, RID_HOMEPOS_VALVE_OPENING);