diff -r 76e8ec46828a -r 745b64e7c695 modbus/web_settings.py --- a/modbus/web_settings.py Fri Dec 25 17:12:02 2020 +0000 +++ b/modbus/web_settings.py Mon Jan 18 10:59:28 2021 +0100 @@ -183,7 +183,7 @@ ("baud" , _("Baud Rate") , ctypes.c_int, MB_Baud ), ("parity" , _("Parity") , ctypes.c_int, MB_Parity ), ("stop_bits" , _("Stop Bits") , ctypes.c_int, MB_StopBits ), - ("slave_id" , _("Slave ID") , ctypes.c_ulonglong, annotate.Integer) + ("slave_id" , _("Slave ID") , ctypes.c_ubyte, annotate.Integer) ] @@ -228,7 +228,7 @@ # This allows us to confirm the saved data contains the correct addr_type # when loading from file save_info = {} - save_info["addr_type"] = ["addr_type"] + save_info["addr_type"] = WebNode_entry["addr_type"] save_info["node_type"] = WebNode_entry["node_type"] save_info["config" ] = newConfig @@ -262,7 +262,7 @@ filename = _WebNodeList[WebNode_id]["filename"] try: #if os.path.isfile(filename): - save_info = json.load(open(filename)) + save_info = json.load(open(os.path.realpath(filename))) except Exception: return None @@ -526,7 +526,7 @@ -def _runtime_modbus_websettings_%(location_str)s_init(): +def _runtime_%(location_str)s_modbus_websettings_init(): """ Callback function, called (by PLCObject.py) when a new PLC program (i.e. XXX.so file) is transfered to the PLC runtime @@ -609,7 +609,7 @@ -def _runtime_modbus_websettings_%(location_str)s_cleanup(): +def _runtime_%(location_str)s_modbus_websettings_cleanup(): """ Callback function, called (by PLCObject.py) when a PLC program is unloaded from memory """