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: function_utilities/function_utilities.cpp
- Revision:
- 52:8ea76864368a
- Parent:
- 50:3c630b5eba9f
- Child:
- 53:4d66fb1c5dd9
- Child:
- 54:647072f5307a
--- a/function_utilities/function_utilities.cpp Wed Feb 19 00:44:07 2020 +0000
+++ b/function_utilities/function_utilities.cpp Wed Feb 19 05:48:57 2020 +0000
@@ -15,7 +15,10 @@
// Board Information
uint8_t BNO = 0;
uint8_t CONTROL_MODE = 0;
-uint8_t OPERATING_MODE = 0;
+uint8_t OPERATING_MODE = 0; // (00 : Moog & Rot, 01 : Moog & Lin, 10 : KNR & Rot, 11 : KNR & Lin)
+uint8_t SENSING_MODE = 0; // (0 : torque, 1: pressure)
+uint8_t CURRENT_CONTROL_MODE = 0; // (0 : pwm, 1 : current control)
+uint8_t FLAG_VALVE_DEADZONE = 0;
uint8_t SETTING_SWITCH = 0;
uint8_t SETTING_SWITCH_OLD = 0;
uint8_t REFERENCE_MODE = 0;
@@ -360,6 +363,9 @@
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);
+ writer.write(RID_CURRENT_CONTROL_MODE, (int) CURRENT_CONTROL_MODE);
+ writer.write(RID_FLAG_VALVE_DEADZONE, (int) FLAG_VALVE_DEADZONE);
writer.write(RID_CAN_FREQ,(int) CAN_FREQ);
writer.write(RID_JOINT_ENC_DIR,(int) DIR_JOINT_ENC);
writer.write(RID_VALVE_DIR,(int) DIR_VALVE);
@@ -436,6 +442,9 @@
{
BNO = flashReadInt(Rom_Sector, RID_BNO);
OPERATING_MODE = flashReadInt(Rom_Sector, RID_OPERATING_MODE);
+ SENSING_MODE = flashReadInt(Rom_Sector, RID_SENSING_MODE);
+ CURRENT_CONTROL_MODE = flashReadInt(Rom_Sector, RID_CURRENT_CONTROL_MODE);
+ FLAG_VALVE_DEADZONE = flashReadInt(Rom_Sector, RID_FLAG_VALVE_DEADZONE);
CAN_FREQ = flashReadInt(Rom_Sector, RID_CAN_FREQ);
DIR_JOINT_ENC = flashReadInt(Rom_Sector, RID_JOINT_ENC_DIR);
DIR_VALVE = flashReadInt(Rom_Sector, RID_VALVE_DIR);