beremiz

c54b0631cb8a
Parents 512b3bd3696a
Children 2f8fd3d28168
MQTT: fixes to allow add/open MQTT extension in python3 IDE
--- a/mqtt/mqtt_client_gen.py Thu Jun 26 14:49:28 2025 +0200
+++ b/mqtt/mqtt_client_gen.py Thu Jun 26 14:50:33 2025 +0200
@@ -40,10 +40,10 @@
("REAL" , ("float" , "D")),
("LREAL", ("double" , "L"))
]
-MQTT_IEC_SUPPORTED_types = list(zip(*MQTT_IEC_types_list)[0])
+MQTT_IEC_SUPPORTED_types = list(list(zip(*MQTT_IEC_types_list))[0])
MQTT_IEC_types = dict(MQTT_IEC_types_list)
-MQTT_JSON_SUPPORTED_types = set(MQTT_IEC_types.keys()+["STRING"])
+MQTT_JSON_SUPPORTED_types = set(list(MQTT_IEC_types.keys())+["STRING"])
"""
QoS - Quality of Service
@@ -336,9 +336,9 @@
def LoadCSV(self,path):
with open(path, 'r') as csvfile:
reader = csv.reader(csvfile, delimiter=',', quotechar='"')
- buf = {direction:[] for direction, _model in self.iteritems()}
- for direction, model in self.iteritems():
- self[direction][:] = []
+ buf = {direction:[] for direction, _model in self.items()}
+ for direction, model in self.items():
+ self[direction].clear()
for row in reader:
direction = row[0]
# avoids calling change callback when loading CSV