Skip to content
Snippets Groups Projects
Commit d515f6f3 authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Added the battery status and pack status information to the list of info read from the battery.

Modified the labrobotica driver to use the CDynamixel interface.
parent a1b86576
No related branches found
No related tags found
No related merge requests found
...@@ -38,20 +38,24 @@ ...@@ -38,20 +38,24 @@
#define Bat_charge_current_H 0x37 #define Bat_charge_current_H 0x37
#define Bat_charge_voltage_L 0x38 #define Bat_charge_voltage_L 0x38
#define Bat_charge_voltage_H 0x39 #define Bat_charge_voltage_H 0x39
#define Bat_design_capacity_L 0x3A #define Bat_status_L 0x3A
#define Bat_design_capacity_H 0x3B #define Bat_status_H 0x3B
#define Bat_design_voltage_L 0x3C #define Bat_design_capacity_L 0x3C
#define Bat_design_voltage_H 0x3D #define Bat_design_capacity_H 0x3D
#define Bat_cell4_voltage_L 0x3E #define Bat_design_voltage_L 0x3E
#define Bat_cell4_voltage_H 0x3F #define Bat_design_voltage_H 0x3F
#define Bat_cell3_voltage_L 0x40 #define Bat_pack_status_L 0x40
#define Bat_cell3_voltage_H 0x41 #define Bat_pack_status_H 0x41
#define Bat_cell2_voltage_L 0x42 #define Bat_cell4_voltage_L 0x42
#define Bat_cell2_voltage_H 0x43 #define Bat_cell4_voltage_H 0x43
#define Bat_cell1_voltage_L 0x44 #define Bat_cell3_voltage_L 0x44
#define Bat_cell1_voltage_H 0x45 #define Bat_cell3_voltage_H 0x45
#define Bat_cell2_voltage_L 0x56
#define Bat_cell2_voltage_H 0x47
#define Bat_cell1_voltage_L 0x48
#define Bat_cell1_voltage_H 0x49
#define RAM_SIZE 70 #define RAM_SIZE 74
extern unsigned char ram_data[RAM_SIZE]; extern unsigned char ram_data[RAM_SIZE];
......
...@@ -18,8 +18,10 @@ ...@@ -18,8 +18,10 @@
#define AverageTimeToFull 0x13 #define AverageTimeToFull 0x13
#define ChargingCurrent 0x14 #define ChargingCurrent 0x14
#define ChargingVoltage 0x15 #define ChargingVoltage 0x15
#define BatteryStatus 0x16
#define DesignCapacity 0x18 #define DesignCapacity 0x18
#define DesignVoltage 0x19 #define DesignVoltage 0x19
#define PackStatus 0x2f
#define VCELL4 0x3c #define VCELL4 0x3c
#define VCELL3 0x3d #define VCELL3 0x3d
#define VCELL2 0x3e #define VCELL2 0x3e
......
...@@ -24,15 +24,17 @@ TSMBusCmd commands[]={{Temperature,Bat_temperature_L}, ...@@ -24,15 +24,17 @@ TSMBusCmd commands[]={{Temperature,Bat_temperature_L},
{AverageTimeToFull,Bat_avg_time_full_L}, {AverageTimeToFull,Bat_avg_time_full_L},
{ChargingCurrent,Bat_charge_current_L}, {ChargingCurrent,Bat_charge_current_L},
{ChargingVoltage,Bat_charge_voltage_L}, {ChargingVoltage,Bat_charge_voltage_L},
{BatteryStatus,Bat_status_L},
{DesignCapacity,Bat_design_capacity_L}, {DesignCapacity,Bat_design_capacity_L},
{DesignVoltage,Bat_design_voltage_L}, {DesignVoltage,Bat_design_voltage_L},
{PackStatus,Bat_pack_status_L},
{VCELL4,Bat_cell4_voltage_L}, {VCELL4,Bat_cell4_voltage_L},
{VCELL3,Bat_cell3_voltage_L}, {VCELL3,Bat_cell3_voltage_L},
{VCELL2,Bat_cell2_voltage_L}, {VCELL2,Bat_cell2_voltage_L},
{VCELL1,Bat_cell1_voltage_L}}; {VCELL1,Bat_cell1_voltage_L}};
unsigned char current_cmd; unsigned char current_cmd;
#define NUM_COMMANDS 19 #define NUM_COMMANDS 21
/* private functions */ /* private functions */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment