--- a/mqtt/mqtt_client_gen.py Thu Jun 26 16:47:08 2025 +0200
+++ b/mqtt/mqtt_client_gen.py Thu Jun 26 16:48:59 2025 +0200
@@ -280,7 +280,7 @@
- iecnums = set(zip(*self)[self.dsc.Location_column])
+ iecnums = set(list(zip(*self))[self.dsc.Location_column]) holes = set(range(greatest)) - iecnums
v["Location"] = min(holes) if holes else greatest+1
@@ -340,12 +340,13 @@
for direction, model in self.items():
- # avoids calling change callback when loading CSV
- v = l._filter_line(row[1:])
+ # avoids calling change callback when loading CSV + v = l._filter_line(row[1:]) # TODO be verbose in case of malformed CSV
@@ -363,7 +364,7 @@
def GenerateC(self, name, path, locstr, config, datatype_info_getter):
c_template_filepath = paths.AbsNeighbourFile(__file__, "mqtt_template.c")
- c_template_file = open(c_template_filepath , 'rb')
+ c_template_file = open(c_template_filepath , 'r') c_template = c_template_file.read()