Fix initial temperatureHistory load not containing any data

master
Bryan Mayland 2013-07-09 14:54:32 -04:00
parent c33c32410b
commit 7d51b32476
1 changed files with 3 additions and 1 deletions

View File

@ -303,8 +303,10 @@ class Printer():
def _sendInitialStateUpdate(self, callback):
try:
data = self._stateMonitor.getCurrentData()
# convert the dict of deques to a dict of lists
temps = {k: list(v) for (k,v) in self._temps.iteritems()}
data.update({
"temperatureHistory": list(self._temps),
"temperatureHistory": temps,
"logHistory": list(self._log),
"messageHistory": list(self._messages)
})