Skip to content
Snippets Groups Projects
Commit 2e3a727b authored by Jake Read's avatar Jake Read
Browse files

corrects inter-segment delta loss

parent 358fa301
Branches
No related tags found
No related merge requests found
Subproject commit 911cba7c18d0d232ad7e04856c55e99027b3e9f8 Subproject commit 0aa41982be0a8ec1189ec6e4517e4f1c2b6774cb
...@@ -62,9 +62,10 @@ EP_ONDATA_RESPONSES onStateData(uint8_t* data, uint16_t len){ ...@@ -62,9 +62,10 @@ EP_ONDATA_RESPONSES onStateData(uint8_t* data, uint16_t len){
Endpoint statesEP(&osap, "states", onStateData); Endpoint statesEP(&osap, "states", onStateData);
void updateStatesEP(void){ void updateStatesEP(void){
uint8_t numBytes = AXL_NUM_DOF * 4 * 3 + 1; uint8_t numBytes = AXL_NUM_DOF * 4 * 3 + 2;
uint8_t stash[numBytes]; uint16_t wptr = 0; uint8_t stash[numBytes]; uint16_t wptr = 0;
stash[wptr ++] = axl_getMode(); stash[wptr ++] = axl_getMode();
axl_isMoving() ? stash[wptr ++] = 1 : stash[wptr ++] = 0;
dofs temp = axl_getPositions(); dofs temp = axl_getPositions();
for(uint8_t a = 0; a < AXL_NUM_DOF; a ++){ for(uint8_t a = 0; a < AXL_NUM_DOF; a ++){
ts_writeFloat32(temp.axis[a], stash, &wptr); ts_writeFloat32(temp.axis[a], stash, &wptr);
......
Subproject commit 4f5c37e60669b7357b29cba0b842014cdda23161 Subproject commit bc18a89d155622fd8ab959773c0eb967cedd9383
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment