Compare commits

..

No commits in common. "master" and "add_vif_volume" have entirely different histories.

7 changed files with 4 additions and 32 deletions

View File

@ -218,7 +218,7 @@ static void parseAndPrintFrame() {
// mbusCommHandle.requestId, // mbusCommHandle.requestId,
// parsedVIB.name, parsedVIB.unit, parsedVIB.exponent); // parsedVIB.name, parsedVIB.unit, parsedVIB.exponent);
if (parsedVIB.found) { if (parsedVIB.found) {
int32_t value = strtol(mbus_data_record_value(record), NULL, 10); uint32_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, false, "mbc papf [%d] %s is %.1f %s (%d * 10^%d)", coloredMsg(LOG_YELLOW, false, "mbc papf [%d] %s is %.1f %s (%d * 10^%d)",
mbusCommHandle.requestId, parsedVIB.name, weightedValue, parsedVIB.unit, mbusCommHandle.requestId, parsedVIB.name, weightedValue, parsedVIB.unit,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

View File

@ -1,6 +1,3 @@
![](./docs/IMG_2915.jpg)
## Build environment ## Build environment
On Ubuntu/Debian install On Ubuntu/Debian install

View File

@ -1,12 +1,12 @@
CFLAGS=-I../../cube/User/Inc -DTEST CFLAGS=-I../cube/User/Inc -DTEST
test: ringbuffer.o test.o test: ringbuffer.o test.o
gcc -o $@ -lcunit $^ gcc -o $@ -lcunit $^
ringbuffer.o: ../../cube/User/Src/ringbuffer.c ringbuffer.o: ../cube/User/Src/ringbuffer.c
gcc -c -o $@ $(CFLAGS) $^ gcc -c -o $@ $(CFLAGS) $^
logger.o: ../../cube/User/Src/logger.c logger.o: ../cube/User/Src/logger.c
gcc -c -o $@ $(CFLAGS) $^ gcc -c -o $@ $(CFLAGS) $^
test.o: test.c test.o: test.c

View File

@ -1,15 +0,0 @@
test: test.o
gcc -o $@ $^
test.o: test.c
gcc -c -o $@ $(CFLAGS) $^
.PHONY: run
run: test
./test
.PHONY: clean
clean:
rm -f *.o test

View File

@ -1,10 +0,0 @@
#include <stdio.h>
#include <stdint.h>
int main() {
uint32_t i = -10;
int32_t j = i;
printf("%lu %d\n", i, j);
}