Bayley Wang
/
foc-ed_in_the_bot_compact
robot
Diff: main.cpp
- Revision:
- 181:d3510c8beab6
- Parent:
- 180:a783a972a867
- Child:
- 184:633119bb0b77
diff -r a783a972a867 -r d3510c8beab6 main.cpp --- a/main.cpp Fri Feb 09 00:48:26 2018 +0000 +++ b/main.cpp Fri Feb 09 03:49:31 2018 +0000 @@ -157,10 +157,6 @@ return control.torque_percent > 0.01f || fabsf(read.w) > W_SAFE; } -float update_filter(float old, float x, float str) { - return str * old + (1.0f - str) * x; -} - void log() { float packet[8]; packet[0] = read.w / 8.0f; @@ -197,6 +193,7 @@ th = new LimitingThrottleMapper(1500.0f); BREMSInit(&io, &read, &foc, &control, false); + io.pc->attach(rxCallback); for (;;) { io.logger->flush();