Bayley Wang
/
foc-ed_in_the_bot_compact
robot
Diff: main.cpp
- Revision:
- 119:ad7a6af6fba3
- Parent:
- 118:2b6dab10b69d
- Child:
- 120:57b6f3b1356b
diff -r 2b6dab10b69d -r ad7a6af6fba3 main.cpp --- a/main.cpp Mon Apr 24 01:51:16 2017 +0000 +++ b/main.cpp Tue Apr 25 04:49:46 2017 +0000 @@ -154,7 +154,7 @@ void log() { io.pc->printf("%d,%d,%d,%d,%d,%d,%d,%d\n", (int) read.w, (int) control.d_ref, (int) control.d_filtered, (int) control.q_ref, (int) control.q_filtered, (int) (255 * control.torque_percent), (int) (255 * foc.vd), (int) (255 * foc.vq)); - //io.pc->printf("%d\n", (int) (io.throttle_in->get_usecs())); + //if (io.pos->IsValid()) io.pc->printf("%f\n", io.pos->GetUnlimitedElecPosition()); wait(1.0f / LOG_FREQUENCY); } @@ -188,7 +188,7 @@ float x = io.throttle_in->get_throttle(); if (x > 0.5f) calibrate_position(&io); } - */ + */ for (;;) { if (ENABLE_LOGGING) {