Bayley Wang
/
foc-ed_in_the_bot_compact
robot
Diff: BREMS/BREMSConfig.cpp
- Revision:
- 86:b059f637e9ac
- Parent:
- 85:2280526f9bad
--- a/BREMS/BREMSConfig.cpp Sun Mar 12 08:46:04 2017 +0000 +++ b/BREMS/BREMSConfig.cpp Sun Mar 12 08:54:19 2017 +0000 @@ -100,6 +100,11 @@ io->pc = new Serial(USBTX, USBRX); io->pc->baud(115200); + + io->pref = new PreferenceWriter(6); + BREMSStartupMsg(read, io->pc); + cmd_reload(io->pc, io->pref); + io->pc->printf("%s", ">"); io->throttle_in = new PwmIn(TH_PIN, TH_LIMIT_LOW, TH_LIMIT_HIGH, TH_LIMIT_CRAZY); io->pos = new PositionSensorEncoder(CPR, 0); @@ -117,11 +122,6 @@ wait_ms(250); BREMSZeroCurrent(read); - io->pref = new PreferenceWriter(6); - BREMSStartupMsg(read, io->pc); - cmd_reload(io->pc, io->pref); - io->pc->printf("%s", ">"); - control->d_integral = 0.0f; control->q_integral = 0.0f; control->d_filtered = 0.0f;