vif parsing

This commit is contained in:
Wolfgang Hottgenroth 2020-11-17 19:03:48 +01:00
parent 29b98cf4fa
commit a17b01f0cd
Signed by: wn
GPG Key ID: 6C1E5E531E0D5D7F
2 changed files with 3 additions and 3 deletions

View File

@ -158,7 +158,7 @@ LDSCRIPT = STM32F103VCTx_FLASH.ld
# libraries # libraries
LIBS = -lc -lm -lnosys LIBS = -lc -lm -lnosys
LIBDIR = 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 # default action: build all
all: $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin all: $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin

View File

@ -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", coloredMsg(LOG_YELLOW, true, "mbc papf [%d] parsed VIB N: %s, U: %s, E: %d",
localMbusCommHandle->requestId, localMbusCommHandle->requestId,
parsedVIB.name, parsedVIB.unit, parsedVIB.exponent); parsedVIB.name, parsedVIB.unit, parsedVIB.exponent);
/*
if (parsedVIB.found) { if (parsedVIB.found) {
uint8_t value = strtol(mbus_data_record_value(record), NULL, 10); uint8_t value = strtol(mbus_data_record_value(record), NULL, 10);
float weightedValue = ((float) value) * powf(10.0, ((float) parsedVIB.exponent)); float weightedValue = ((float) value) * powf(10.0, ((float) parsedVIB.exponent));
coloredMsg(LOG_YELLOW, true, "mbc papf [%d] result: %s is %f %s", coloredMsg(LOG_YELLOW, true, "mbc papf [%d] result: %s is %f %s",
localMbusCommHandle->requestId, parsedVIB.name, weightedValue, parsedVIB.unit); localMbusCommHandle->requestId, parsedVIB.name, weightedValue, parsedVIB.unit);
} }
*/
} }
} }
} }