From f68a12b2fc1363b13746bbe1df21d73cb13fcbf7 Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Sat, 28 Nov 2020 02:56:46 -0800 Subject: [PATCH] send over CAN --- firmware/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/firmware/main.cpp b/firmware/main.cpp index 8cba942..752ae91 100644 --- a/firmware/main.cpp +++ b/firmware/main.cpp @@ -45,9 +45,9 @@ int main() { InitCan(); while(1) { - size_t writeCount = chsnprintf(strBuffer, 200, "%.4f\t%.2f\t%.3f\n", GetSensorInternalResistance(), GetNernstDc(), GetLambda()); - uartStartSend(&UARTD1, writeCount, strBuffer); + float esr = GetSensorInternalResistance(); + float lambda = GetLambda(); - chThdSleepMilliseconds(10); + SendCanData(lambda, esr); } }