diff --git a/cube/Makefile b/cube/Makefile index 4ef4919..99801b9 100644 --- a/cube/Makefile +++ b/cube/Makefile @@ -158,7 +158,7 @@ LDSCRIPT = STM32F103VCTx_FLASH.ld # libraries LIBS = -lc -lm -lnosys LIBDIR = -LDFLAGS = $(MCU) -specs=nano.specs -T$(LDSCRIPT) $(LIBDIR) $(LIBS) -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref -Wl,--gc-sections +LDFLAGS = $(MCU) -specs=nano.specs -u _printf_float -T$(LDSCRIPT) $(LIBDIR) $(LIBS) -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref -Wl,--gc-sections # default action: build all all: $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin diff --git a/cube/User/Src/mbusComm.c b/cube/User/Src/mbusComm.c index caf8551..67797e5 100644 --- a/cube/User/Src/mbusComm.c +++ b/cube/User/Src/mbusComm.c @@ -181,14 +181,14 @@ static void parseAndPrintFrame(t_mbusCommHandle *localMbusCommHandle) { coloredMsg(LOG_YELLOW, true, "mbc papf [%d] parsed VIB N: %s, U: %s, E: %d", localMbusCommHandle->requestId, parsedVIB.name, parsedVIB.unit, parsedVIB.exponent); - /* + if (parsedVIB.found) { uint8_t value = strtol(mbus_data_record_value(record), NULL, 10); float weightedValue = ((float) value) * powf(10.0, ((float) parsedVIB.exponent)); coloredMsg(LOG_YELLOW, true, "mbc papf [%d] result: %s is %f %s", localMbusCommHandle->requestId, parsedVIB.name, weightedValue, parsedVIB.unit); } - */ + } } }