oklm
Dependents: RoboClaw TestMyPathFind Robot2016_2-0_STATIC Stressed ... more
Revision 1:f76058f9f548, committed 2015-11-24
- Comitter:
- sype
- Date:
- Tue Nov 24 15:01:49 2015 +0000
- Parent:
- 0:af5cf35e1a25
- Child:
- 2:a2c141d922b3
- Commit message:
- GotoThet
Changed in this revision
RoboClaw.cpp | Show annotated file Show diff for this revision Revisions of this file |
RoboClaw.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/RoboClaw.cpp Mon Nov 16 11:32:35 2015 +0000 +++ b/RoboClaw.cpp Tue Nov 24 15:01:49 2015 +0000 @@ -242,10 +242,15 @@ write_n(15,address,M2SPEEDACCELDIST,SetDWORDval(accel),SetDWORDval(speed),SetDWORDval(distance),buffer); } -void RoboClaw::SpeedAccelDeccelPositionM1(unsigned char address, unsigned long accel, long speed, unsigned long deccel, unsigned long position, unsigned char flag){ - return write_n(19,address,M1SPEEDACCELDECCELPOS,SetDWORDval(accel),SetDWORDval(speed),SetDWORDval(deccel),SetDWORDval(position),flag); +void RoboClaw::SpeedAccelDeccelPositionM1(unsigned char address, unsigned long accel, long speed, unsigned long deccel, long position, unsigned char flag){ + write_n(19,address,M1SPEEDACCELDECCELPOS,SetDWORDval(accel),SetDWORDval(speed),SetDWORDval(deccel),SetDWORDval(position),flag); } -void RoboClaw::SpeedAccelDeccelPositionM2(unsigned char address, unsigned long accel, long speed, unsigned long deccel, unsigned long position, unsigned char flag){ - return write_n(19,address,M2SPEEDACCELDECCELPOS,SetDWORDval(accel),SetDWORDval(speed),SetDWORDval(deccel),SetDWORDval(position),flag); -} \ No newline at end of file +void RoboClaw::SpeedAccelDeccelPositionM2(unsigned char address, unsigned long accel, long speed, unsigned long deccel, long position, unsigned char flag){ + write_n(19,address,M2SPEEDACCELDECCELPOS,SetDWORDval(accel),SetDWORDval(speed),SetDWORDval(deccel),SetDWORDval(position),flag); +} + +void RoboClaw::SpeedAccelDeccelPositionM1M2(unsigned char address,unsigned long accel1,unsigned long speed1,unsigned long deccel1, long position1,unsigned long accel2,unsigned long speed2,unsigned long deccel2, long position2,unsigned char flag){ + write_n(35,address,MIXEDSPEEDACCELDECCELPOS,SetDWORDval(accel1),SetDWORDval(speed1),SetDWORDval(deccel1),SetDWORDval(position1),SetDWORDval(accel2),SetDWORDval(speed2),SetDWORDval(deccel2),SetDWORDval(position2),flag); +} +
--- a/RoboClaw.h Mon Nov 16 11:32:35 2015 +0000 +++ b/RoboClaw.h Tue Nov 24 15:01:49 2015 +0000 @@ -37,8 +37,9 @@ void SpeedDistanceM2(unsigned char address, long speed, unsigned long distance, unsigned char buffer); void SpeedAccelDistanceM1(unsigned char address, long accel, long speed, unsigned long distance, unsigned char buffer); void SpeedAccelDistanceM2(unsigned char address, long accel, long speed, unsigned long distance, unsigned char buffer); - void SpeedAccelDeccelPositionM1(unsigned char address, unsigned long accel, long speed, unsigned long deccel, unsigned long position, unsigned char flag); - void SpeedAccelDeccelPositionM2(unsigned char address, unsigned long accel, long speed, unsigned long deccel, unsigned long position, unsigned char flag); + void SpeedAccelDeccelPositionM1(unsigned char address, unsigned long accel, long speed, unsigned long deccel, long position, unsigned char flag); + void SpeedAccelDeccelPositionM2(unsigned char address, unsigned long accel, long speed, unsigned long deccel, long position, unsigned char flag); + void SpeedAccelDeccelPositionM1M2(unsigned char address,unsigned long accel1,unsigned long speed1,unsigned long deccel1, long position1,unsigned long accel2,unsigned long speed2,unsigned long deccel2, long position2,unsigned char flag); private: Serial _roboclaw;