41#define DUMP_BUFFER(buffer, size) \
43 Serial.print("Buffer dump: "); \
44 for (size_t i = 0; i < size; i++) \
46 Serial.print(buffer[i], HEX); \
Joint firmware.
Definition filters.h:15
size_t tx_length
Definition joint.ino:63
void readValue(T &val, uint8_t *rxBuf, size_t rx_length)
Reads a value from a buffer to a value of the specified type.
Definition joint.h:103
stp_reg_t
register and command definitions
Definition joint.h:62
@ MOVEANGLE
Definition joint.h:68
@ CLEARSTALL
Definition joint.h:80
@ DISABLEPID
Definition joint.h:83
@ SETBRAKEMODE
W; Size: 1; [(uint8) mode].
Definition joint.h:81
@ ANGLEMOVED
R; Size: 4; [(float) degrees].
Definition joint.h:72
@ HOME
W; Size: 4; [(uint8) current, (uint8) sensitivity, (uint8) speed, (uint8) direction].
Definition joint.h:92
@ DISABLECLOSEDLOOP
W; Size: 1; [(uint8) 0].
Definition joint.h:85
@ STOP
W; Size: 1; [(uint8) mode].
Definition joint.h:88
@ SETUP
W; Size: 2; [(uint8) holdCurrent, (uint8) driveCurrent].
Definition joint.h:64
@ MOVETOEND
Definition joint.h:87
@ GETPIDERROR
Definition joint.h:89
@ GETENCODERRPM
R; Size: 4; [(float) RPM].
Definition joint.h:91
@ SETCURRENT
W; Size: 1; [(uint8) driveCurrent].
Definition joint.h:73
@ CHECKORIENTATION
W; Size: 4; [(float) degrees].
Definition joint.h:90
@ SETMAXDECELERATION
Definition joint.h:76
@ SETMAXACCELERATION
W; Size: 4; [(float) deg/s^2].
Definition joint.h:75
@ GETMOTORSTATE
Definition joint.h:70
@ GETDRIVERRPM
Definition joint.h:66
@ MOVESTEPS
W; Size: 4; [(int32) steps].
Definition joint.h:67
@ SETMAXVELOCITY
W; Size: 4; [(float) deg/s].
Definition joint.h:77
@ SETCONTROLTHRESHOLD
Definition joint.h:86
@ ENABLECLOSEDLOOP
Definition joint.h:84
@ ENABLESTALLGUARD
W; Size: 1; [(uint8) threshold].
Definition joint.h:78
@ ENABLEPID
Definition joint.h:82
@ SETHOLDCURRENT
W; Size: 1; [(uint8) holdCurrent].
Definition joint.h:74
@ HOMEOFFSET
R/W; Size: 4; [(float) -].
Definition joint.h:93
@ MOVETOANGLE
W; Size: 4; [(float) degrees].
Definition joint.h:69
@ RUNCOTINOUS
Definition joint.h:71
@ DISABLESTALLGUARD
Definition joint.h:79
@ PING
R; Size: 1; [(char) ACK].
Definition joint.h:63
@ SETRPM
W; Size: 4; [(float) RPM].
Definition joint.h:65
size_t rx_length
Definition joint.ino:64
int writeValue(const T val, uint8_t *txBuf, size_t &tx_length)
Writes a value of the specified type to a buffer.
Definition joint.h:116