officinerobotiche / uNAV.X

Project MPLABX for drive uNAV on dsPIC33
http://rnext.it/project/unav/
MIT License
9 stars 2 forks source link

Add debug variable messages #30

Open rbonghi opened 9 years ago

rbonghi commented 9 years ago

Now the packet communication doesn't have a general purpose message to send variables to debug. I will add in serial protocol a new type of messages to send debug messages.

typedef int8_t debug8;
typedef int16_t debug16;
//...
typedef float debug_float;
//..
//Number association for standard messages
#define DEBUG8 0
#define DEBUG16 1
// ...
#define DEBUG_FLOAT n
//...

Finally I will write a new hash map with list of type debug messages:

#define INITIALIZE_HASHMAP_DEBUG hashmap_default[DEBUG8] = LNG_DEBUG8;    \
                                   //....
                                   hashmap_default[DEBUG_FLOAT] = LNG_DEBUG_FLOAT;