Commit c2088f00 authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Added the walking interface to the dynamixel slave.

parent 652f78e2
......@@ -354,6 +354,8 @@ typedef enum {
#define GYRO_BASE_ADDRESS 0x017C
#define GYRO_MEM_LENGTH 6
#define GYRO_EEPROM_ADDRESS 0x0031
#define GYRO_EEPROM_LENGTH 2
#define GYRO_CALIBRATE 0x01
#define GYRO_EN_CAL_INT 0x02
#define GYRO_EN_FALL_DET 0x04
......
......@@ -86,9 +86,12 @@ unsigned char bioloid_on_write(unsigned short int address,unsigned short int len
// action commands
if(action_in_range(address,length))
action_process_write_cmd(address,length,data);
// action commands
// gyro commands
if(gyro_in_range(address,length))
gyro_process_write_cmd(address,length,data);
// walk commands
if(walking_in_range(address,length))
walking_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]);
......
......@@ -59,7 +59,7 @@ inline void gyro_get_offsets(uint16_t *fb_offset,uint16_t *lr_offset)
uint8_t gyro_in_range(unsigned short int address, unsigned short int length)
{
if(ram_in_window(GYRO_BASE_ADDRESS,GYRO_MEM_LENGTH,address,length) ||
ram_in_window(BIOLIOD_GYRO_FB_ADC_CH,BIOLIOD_GYRO_LR_ADC_CH,address,length))
ram_in_window(GYRO_EEPROM_ADDRESS,GYRO_EEPROM_LENGTH,address,length))
return 0x01;
else
return 0x00;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment