foosel/OctoPrint — pull request #184 by CapnBry (2013-07-09 19:03:47+00:00)
Title: Fix initial temperatureHistory load not containing any data

I broke it! My patch to switch internal data structures to deques didn't convert the temperatureHistory field of data sent in the initial page load. This meant the initial graph would come up blank until there were two updates *after* the page was fully loaded, and never showed the full 300 point history.

This just converts the dictionary of deques to a dictionary of lists before sending it. The other alternative would be to just use lists internally, but because the `_sendInitialStateUpdate()` is called only once per full page load versus once every 5 seconds all the time, it made more sense to do it here. If it were in `_addTemperatureData()`, this same overhead would be incurred every 5 seconds once the lists had grown to their full 300 point capacity.