vif parsing
This commit is contained in:
parent
29b98cf4fa
commit
a17b01f0cd
@ -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
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user