
Octopus!!
Dependencies: 2017NHKpin_config FEP HMC6352 PID QEI R1307 ikarashiMDC omni_wheel
Fork of KANIv3 by
Diff: bot/controller/controller.cpp
- Revision:
- 52:320f910ca6ca
- Parent:
- 49:69a7235d837a
--- a/bot/controller/controller.cpp Mon Nov 13 17:33:30 2017 +0900 +++ b/bot/controller/controller.cpp Thu Nov 23 11:49:39 2017 +0900 @@ -24,7 +24,7 @@ { } -bool Controller::receiveState() +int Controller::receiveState() { fepTemp = FEP::read(data, DATA_SIZE); if(fepTemp == FEP_SUCCESS) { @@ -42,10 +42,14 @@ if(stick[i] < -1.0) stick[i] = -1.0; } setStick(); + } else if(fepTemp == FEP_DT_BIN) { + return 2; + } else if(fepTemp == FEP_DT_BIN) { + return 3; } else if(fepTemp == FEP_NO_RESPONSE) { return 0; } else { - return 0; + return 4; } return 1; }