recieveController
Diff: recieveController.cpp
- Revision:
- 1:445486d27613
- Parent:
- 0:57fc300625c4
- Child:
- 3:6287618256b5
--- a/recieveController.cpp Fri Sep 01 11:18:24 2017 +0900 +++ b/recieveController.cpp Fri Dec 01 18:15:58 2017 +0900 @@ -4,7 +4,7 @@ { id_ = id; serial.baud(115200); - for(int i = 0;i<5;i++) + for(int i = 0;i<7;i++) { buttons[i] = 0; } @@ -25,6 +25,8 @@ analog[1] = strtok(NULL,"-"); analog[2] = strtok(NULL,"-"); analog[3] = strtok(NULL,"-"); + analog[4] = strtok(NULL,"-"); + analog[5] = strtok(NULL,"-"); intensity = strtok(NULL,"-"); //printf("%d\n",strtoul(button_,0,16) ); @@ -33,5 +35,6 @@ buttons[2] = strtoul(analog[1],0,16); buttons[3] = strtoul(analog[2],0,16); buttons[4] = strtoul(analog[3],0,16); - return; + buttons[5] = strtoul(analog[4],0,16); + buttons[6] = strtoul(analog[5],0,16); }