From 04ed4d762881d70ca9e6cc8a787af0405b9dd240 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20=C3=96hrstr=C3=B6m?= Date: Sun, 11 Feb 2024 00:12:31 +0100 Subject: [PATCH] Add --driverdir= and --driver= for loading drivers from text files. --- Makefile | 1 + README.md | 2 + scripts/install_default_configuration.sh | 15 + src/cmdline.cc | 95 +- src/config.cc | 5 + src/config.h | 1 + src/driver_dynamic.cc | 6 +- src/drivers.c | 41 + src/drivers.h | 25 + src/main.cc | 9 +- src/meters.cc | 62 +- src/meters.h | 2 + src/xmq.c | 2175 ++++++++++++++++------ src/xmq.h | 195 +- tests/test_config_overrides.sh | 12 +- 15 files changed, 1969 insertions(+), 677 deletions(-) create mode 100644 src/drivers.c create mode 100644 src/drivers.h diff --git a/Makefile b/Makefile index d7d7576..49dab25 100644 --- a/Makefile +++ b/Makefile @@ -157,6 +157,7 @@ PROG_OBJS:=\ $(BUILD)/bus.o \ $(BUILD)/cmdline.o \ $(BUILD)/config.o \ + $(BUILD)/drivers.o \ $(BUILD)/dvparser.o \ $(BUILD)/formula.o \ $(BUILD)/mbus_rawtty.o \ diff --git a/README.md b/README.md index f4901c6..b1191e2 100644 --- a/README.md +++ b/README.md @@ -414,6 +414,8 @@ As {options} you can use: --calculate_flow_f=flow_temperature_c --debug for a lot of information --donotprobe= do not auto-probe this tty. Use multiple times for several ttys or specify "all" for all ttys. + --driver= load a driver + --driverdir= load all drivers in dir --exitafter=