Bayley Wang
/
foc-ed_in_the_bot_compact
robot
Diff: BREMS/BREMSConfig.cpp
- Revision:
- 154:0a22dcf91577
- Parent:
- 151:5bbb15351798
- Child:
- 165:2463dbe52eee
--- a/BREMS/BREMSConfig.cpp Thu May 04 15:16:56 2017 +0000 +++ b/BREMS/BREMSConfig.cpp Thu May 04 16:52:04 2017 +0000 @@ -2,6 +2,7 @@ #include "BREMSConfig.h" #include "BREMSStructs.h" +#include "Filter.h" #include "config_pins.h" #include "config_inverter.h" @@ -113,6 +114,9 @@ io->throttle_in = new PwmIn(TH_PIN, TH_LIMIT_LOW, TH_LIMIT_HIGH); io->pos = new PositionSensorEncoder(CPR, 0); + control->throttle_filter = new MedianFilter(THROTTLE_FILTER_WINDOW); + control->velocity_filter = new MedianFilter(W_FILTER_WINDOW); + read->vbus = BUS_VOLTAGE; read->w = 0.0f; read->ia_supp_offset = 0.0f;