bio robot
Dependencies: MPU6050-DMP QEI_hw mbed-rpc mbed
Fork of MPU6050_Example by
Diff: Comm/Comm.cpp
- Revision:
- 14:d620415259b1
- Parent:
- 11:711d3c207e8c
- Child:
- 17:8a0e647cf551
--- a/Comm/Comm.cpp Wed Dec 09 03:25:22 2015 +0000 +++ b/Comm/Comm.cpp Wed Dec 09 03:40:38 2015 +0000 @@ -56,27 +56,16 @@ _controls->setSwingUpD(d); printGains(); } -void Comm::setCurrentP(Arguments* input, Reply* output){ +void Comm::setDesiredThetaP(Arguments* input, Reply* output){ if (input->argc < 1){ throwNotEnoughArgsError(); return; } float p = input->getArg<float>(); - _controls->setCurrentP(p); + _controls->setDesiredThetaP(p); printGains(); } -void Comm::setCurrentD(Arguments* input, Reply* output){ - if (input->argc < 1){ - throwNotEnoughArgsError(); - return; - } - float d = input->getArg<float>(); - _controls->setCurrentD(d); - printGains(); -} - - void Comm::printGains(){ _json.open(); @@ -84,9 +73,7 @@ _json.sepItem(); _json.print("swingUpD", _controls->getSwingUpD()); _json.sepItem(); - _json.print("currentP", _controls->getCurrentP()); - _json.sepItem(); - _json.print("currentD", _controls->getCurrentD()); + _json.print("desiredThetaP", _controls->getDesiredThetaP()); _json.close(); }