Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: PSL_ROBOT_lorenzo robot_lorenzo recepteur_mbed_os_6
Diff: MX12.h
- Revision:
- 10:ca9afe156ee1
- Parent:
- 9:b4a5187fdec6
- Child:
- 11:9bc7f5e2ccee
--- a/MX12.h Sat Nov 06 16:15:34 2021 +0000 +++ b/MX12.h Sat Nov 06 16:56:46 2021 +0000 @@ -85,16 +85,21 @@ * * @warning * - * Error field of status packet if decoded by GetStatus(() function which - * returns an enumation type "Status". As several errors can be reported - * simultaneously the type enum is not suitable (B. Denis 11/2021) + * Warning 1: error field of status packet if decoded by GetStatus() + * Doxygen Release 1.7.2 returns an enumation type "Status". As several + * errors can be reported simultaneously the type enum is not suitable + * (B. Denis 11/2021). + * + * \bug * - * @bug + * Bug : _frame_pointer variable is used by private _ReadCallback() ISR + * to store the current size for message (status packet) received from + * servomotor. This variable is NOT initialised and NEVER reset to zero + * at each new message. * - * _frame_pointer variable is used by _ReadCallback() ISR to store the - * current size for message (status packet) received from servomotor. - * This variable is NOT initialised and NEVER reset to zero at each new - * message. + * Bug: GetStatus() method has a hazardous behavior because it provides + * a result by reading the content of the variable _current_frame + * which can be modified at any time by the private ISR _ReadCallback() * */ class MX12 @@ -196,7 +201,10 @@ */ void SetSpeed(unsigned char mot_id, float speed); - /** + /** Informs about the availability of the bus for a new transmission + * of instruction packet (Method Access Control) + * + * @returns true if bus ready for a new transmission, otherwise false */ char IsAvailable(void); @@ -248,13 +256,15 @@ * servomotor. * * @warning - * If a combination of several errors is reported the function - * returns 'Unknown' (B. Denis 11/2021) + * + * Warning: if a combination of several errors is reported the function + * returns 'Unknown' (B. Denis 11/2021). * * @bug - * This method has a hazardous behavior because it provides a result by - * reading the content of the variable _current_frame which can be - * modified at any time by the private ISR _ReadCallback() + * + * Bug: this method has a hazardous behavior because it provides + * a result by reading the content of the variable _current_frame + * which can be modified at any time by the private ISR _ReadCallback() */ MX12::Status GetStatus(void); @@ -264,7 +274,7 @@ // void ReadPosition(unsigned char mot_id); // float GetPosition(unsigned char mot_id); - private: + protected: /* */ @@ -273,7 +283,6 @@ MX12::SerialState _sstate; /** Structure used only by ISR (Interrupt Service Routine) ReadCallback() - * */ MX12::StateContext _scontext; MX12::Frame _current_frame;