by billyzelsnack » Tue Jan 16, 2007 8:40 am
by billyzelsnack
Tue Jan 16, 2007 8:40 am
I'm now able to get/set servo values, though I have some garbage in there so I have to do it multiple times for it to work. Good thing is that it seems to be robust enough to get itself out of a mess. Now to get rid of the mess!
The API continues to evolve. Here's today incarnation..
int dmtalk_connect( enum DMTalkApiVersion apiVersion, const char* port );
void dmtalk_disconnect( );
int dmtalk_packet_read( int valuesCapacity, unsigned char* result_values );
int dmtalk_packet_write( int servoId, enum DMTalkInstruction instruction, enum DMTalkAddress address, int numValues, const unsigned char* values);
int dmtalk_value_get( int servoId, enum DMTalkAddress address, int numValues, unsigned char* result_values);
int dmtalk_value_get_8( int servoId, enum DMTalkAddress address, unsigned char* result_value);
int dmtalk_value_get_16( int servoId, enum DMTalkAddress address, unsigned short* result_value);
int dmtalk_value_set( int servoId, enum DMTalkAddress address, int dataLength, const unsigned char* data);
int dmtalk_value_set_8( int servoId, enum DMTalkAddress address, unsigned char value);
int dmtalk_value_set_16( int servoId, enum DMTalkAddress address, unsigned short value);
I'm now able to get/set servo values, though I have some garbage in there so I have to do it multiple times for it to work. Good thing is that it seems to be robust enough to get itself out of a mess. Now to get rid of the mess!
The API continues to evolve. Here's today incarnation..
int dmtalk_connect( enum DMTalkApiVersion apiVersion, const char* port );
void dmtalk_disconnect( );
int dmtalk_packet_read( int valuesCapacity, unsigned char* result_values );
int dmtalk_packet_write( int servoId, enum DMTalkInstruction instruction, enum DMTalkAddress address, int numValues, const unsigned char* values);
int dmtalk_value_get( int servoId, enum DMTalkAddress address, int numValues, unsigned char* result_values);
int dmtalk_value_get_8( int servoId, enum DMTalkAddress address, unsigned char* result_value);
int dmtalk_value_get_16( int servoId, enum DMTalkAddress address, unsigned short* result_value);
int dmtalk_value_set( int servoId, enum DMTalkAddress address, int dataLength, const unsigned char* data);
int dmtalk_value_set_8( int servoId, enum DMTalkAddress address, unsigned char value);
int dmtalk_value_set_16( int servoId, enum DMTalkAddress address, unsigned short value);