bio robot
Dependencies: MPU6050-DMP QEI_hw mbed-rpc mbed
Fork of MPU6050_Example by
Diff: main.cpp
- Revision:
- 11:711d3c207e8c
- Parent:
- 10:769cc457c3a4
- Child:
- 12:49813131dd15
diff -r 769cc457c3a4 -r 711d3c207e8c main.cpp --- a/main.cpp Sat Dec 05 09:04:23 2015 +0000 +++ b/main.cpp Tue Dec 08 22:52:46 2015 +0000 @@ -16,18 +16,20 @@ controls.setPC(comm.getPC()); controls.setup(); // comm.printPosition(); -// comm.printGains(); + comm.printGains(); controlsInterrupt.attach_us(&controls, &Controls::loop, 1000); while(1) { controls.updateIMUS(); comm.check(); - if (serialCounter++>1000000) { + + if (serialCounter++>100) { +// comm.printPosition(); // comm.getPC()->printf("%f\n", controls.getTheta1()); // comm.getPC()->printf("%f", controls.motor.getPWM()); serialCounter = 0; -// comm.getPC()->printf("%f\n", controls.motor.getTorque()); +// comm.printPosition(); } } } @@ -73,10 +75,10 @@ comm.setTarget(input, output); }; RPCFunction SetTarget(&setTargetWrapper, "SetTarget"); -void setTorqueWrapper(Arguments * input, Reply * output){ - comm.setTorque(input, output); +void setThetaWrapper(Arguments * input, Reply * output){ + comm.setTheta(input, output); }; -RPCFunction SetTorque(&setTorqueWrapper, "SetTorque"); +RPCFunction SetTheta(&setThetaWrapper, "SetTheta"); void printGainsWrapper(Arguments * input, Reply * output){ comm.printGains(); };