From 27fb33ebd354c91f43a975a66811bfb16acbcbd1 Mon Sep 17 00:00:00 2001 From: Fabien Poussin Date: Fri, 31 Mar 2017 15:59:10 +0200 Subject: [PATCH] Fixes for chprint, updating submodule to use our custom version. --- firmware/ChibiOS | 2 +- firmware/controllers/lcd_controller.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/firmware/ChibiOS b/firmware/ChibiOS index 3619aac78f..4560c4a146 160000 --- a/firmware/ChibiOS +++ b/firmware/ChibiOS @@ -1 +1 @@ -Subproject commit 3619aac78fcf83f102df27bdf47a6e349aebc4aa +Subproject commit 4560c4a1463ffe6fe538f9f67e125c78c19f8498 diff --git a/firmware/controllers/lcd_controller.cpp b/firmware/controllers/lcd_controller.cpp index d786ef1395..7007d2f367 100644 --- a/firmware/controllers/lcd_controller.cpp +++ b/firmware/controllers/lcd_controller.cpp @@ -117,7 +117,13 @@ void initLcdController(void) { } static char * prepareVBattMapLine(engine_configuration_s *engineConfiguration, char *buffer) { - return buffer + chsnprintf(buffer, 23,"V%10.0f M%10.0f", getVBatt(PASS_ENGINE_PARAMETER_F), getRawMap()); + char *ptr = buffer; + *ptr++ = 'V'; + ptr = ftoa(ptr, getVBatt(PASS_ENGINE_PARAMETER_F), 10.0f); + + ptr = appendStr(ptr, " M"); + ptr = ftoa(ptr, getRawMap(), 10.0f); + return ptr; } static char * prepareCltIatTpsLine(Engine *engine, char *buffer) {