Librairie pour contrôler un moteur connecté à un contrôleur SDC21XX
Dependencies: CANopen_Node Roboteq_SDC_serie
Dependents: TCP_Server_Example
Fork of SDC21XX_Motor by
Revision 4:7aaa045734b7, committed 2016-07-21
- Comitter:
- kkoichy
- Date:
- Thu Jul 21 13:11:07 2016 +0000
- Parent:
- 3:d93b18353995
- Commit message:
- Commit
Changed in this revision
SDC21XX_Motor.cpp | Show annotated file Show diff for this revision Revisions of this file |
SDC21XX_Motor.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/SDC21XX_Motor.cpp Tue Jul 12 09:21:12 2016 +0000 +++ b/SDC21XX_Motor.cpp Thu Jul 21 13:11:07 2016 +0000 @@ -67,19 +67,31 @@ { RB.SetVelocity(_vel, channel); } + void SDC21XX_Motor::SetAcceleration(long _accel) { RB.SetAcceleration(_accel, channel); } + void SDC21XX_Motor::SetDeceleration(long _decel) { RB.SetDeceleration(_decel, channel); } + void SDC21XX_Motor::Setparameters(uint16_t _vel, long _accel, long _decel) { RB.SetParameters(_vel, _accel, _decel, channel); } + void SDC21XX_Motor::SetRB(Roboteq* _RB) + { + RB = *_RB; + } + Roboteq* SDC21XX_Motor::GetRB(void) + { + return &RB; + } + }//end namespace \ No newline at end of file
--- a/SDC21XX_Motor.h Tue Jul 12 09:21:12 2016 +0000 +++ b/SDC21XX_Motor.h Thu Jul 21 13:11:07 2016 +0000 @@ -73,6 +73,9 @@ void SetAcceleration(long _accel); void SetDeceleration(long _decel); void Setparameters(uint16_t _vel, long _accel, long _decel); + void SetRB (Roboteq* _RB); + Roboteq* GetRB(void); + private :