Bayley Wang
/
foc-ed_in_the_bot_compact
robot
Diff: BREMS/BREMSConfig.cpp
- Revision:
- 180:a783a972a867
- Parent:
- 165:2463dbe52eee
- Child:
- 181:d3510c8beab6
--- a/BREMS/BREMSConfig.cpp Thu Feb 08 02:01:08 2018 +0000 +++ b/BREMS/BREMSConfig.cpp Fri Feb 09 00:48:26 2018 +0000 @@ -2,12 +2,14 @@ #include "BREMSConfig.h" #include "BREMSStructs.h" +#include "BufferedLogger.h" #include "Filter.h" #include "config_pins.h" #include "config_inverter.h" #include "config_motor.h" #include "config_loop.h" +#include "config_logging.h" void BREMSConfigRegisters(IOStruct *io) { RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN; @@ -112,7 +114,8 @@ io->pc->baud(921600); io->pos = new PositionSensorEncoder(CPR, 0); - + io->logger = new BufferedLogger(LOG_PACKET_SIZE, (LOG_PAGE_SIZE-LOG_HEADER_SIZE)/(LOG_PACKET_SIZE+1), LOG_TX, LOG_RX, LOG_BAUD_RATE); + wait_ms(750); io->throttle_in = new PwmIn(TH_PIN, TH_LIMIT_LOW, TH_LIMIT_HIGH);