send dummy can msg

This commit is contained in:
Matthew Kennedy 2020-09-19 16:51:02 -07:00
parent 72c2c271fb
commit 2a38367225
1 changed files with 11 additions and 6 deletions

View File

@ -1,6 +1,7 @@
#include "ch.h" #include "ch.h"
#include "hal.h" #include "hal.h"
#include "can.h"
#include "pwm.h" #include "pwm.h"
// 400khz / 1024 = 390hz PWM // 400khz / 1024 = 390hz PWM
@ -14,13 +15,17 @@ Pwm pumpDac(PWMD3, 1, 48000000, 1024);
* Application entry point. * Application entry point.
*/ */
int main(void) { int main(void) {
halInit(); halInit();
chSysInit(); chSysInit();
heaterPwm.Start(); InitCan();
pumpDac.Start();
while (true) { heaterPwm.Start();
pumpDac.Start();
} while (true) {
// dummy data
SendCanData(0.5f, 300);
chThdSleepMilliseconds(10);
}
} }