fix in CmdServer and change file name in config to .json

This commit is contained in:
2019-07-16 13:16:35 +01:00
parent d97b7469fe
commit 2fc6fe0830
4 changed files with 3 additions and 3 deletions

View File

@ -309,7 +309,7 @@ class CmdInterpreter(cmd.Cmd):
self.__println("DO NOT FORGET TO SAVE AFTERWARDS!") self.__println("DO NOT FORGET TO SAVE AFTERWARDS!")
def do_save(self, arg): def do_save(self, arg):
RegisterDatapoint.saveRegisterFile(self.registers, self.config.registerFile) RegisterDatapoint.saveRegisterList(self.registers, self.config.registerFile)
def help_save(self): def help_save(self):
self.__println("Usage: save") self.__println("Usage: save")

View File

@ -9,7 +9,7 @@ class Config(object):
self.mqttPassword = '' self.mqttPassword = ''
self.cmdAddress = '127.0.0.1' self.cmdAddress = '127.0.0.1'
self.cmdPort = 9999 self.cmdPort = 9999
self.registerFile = 'registers.pkl' self.registerFile = 'registers.json'
self.serialPort = '/dev/ttyAMA0' self.serialPort = '/dev/ttyAMA0'
self.serialBaudRate = 9600 self.serialBaudRate = 9600
self.interCommDelay = 0.025 self.interCommDelay = 0.025

View File

@ -29,7 +29,7 @@
"count": 1, "count": 1,
"label": "Switches", "label": "Switches",
"publishTopic": "Pub/Switches", "publishTopic": "Pub/Switches",
"scanRate": 60.0, "scanRate": 0.25,
"unit": 4, "unit": 4,
"updateOnly": false "updateOnly": false
}, },

Binary file not shown.