Skip to content
Snippets Groups Projects
Commit 4465ddb8 authored by Irene Garcia Camacho's avatar Irene Garcia Camacho
Browse files

Added smart charger module to the Dynamixel Slave

Added to the darwin_on_write() function the smart charger's module for write commands.
Possible commands of this module: Enable or disable module, set smart charger period or write data to smart charger.
parent 2bd268c4
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@
#include "joint_motion.h"
#include "head_tracking.h"
#include "grippers.h"
#include "smart_charger.h"
/* timer for the execution of the dynamixel slave loop */
#define DYN_SLAVE_TIMER TIM7
......@@ -92,6 +93,9 @@ unsigned char darwin_on_write(unsigned short int address,unsigned short int leng
// gripper commands
if(grippers_in_range(address,length))
grippers_process_write_cmd(address,length,data);
// smart charger commands
if(smart_charger_in_range(address,length))
smart_charger_process_write_cmd(address,length,data);
// write eeprom
for(i=address,j=0;i<LAST_EEPROM_OFFSET && i<(address+length);i++,j++)
EE_WriteVariable(i,data[j]);
......
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