Fix displaying reservoir level on startup.

This commit is contained in:
Johannes Mockenhaupt 2017-10-19 00:04:01 +02:00
parent 16bb9a66e3
commit 0a67bb73a4
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -281,10 +281,9 @@ public class ComboPlugin implements PluginBase, PumpInterface {
CommandResult commandResult = ruffyScripter.readPumpState();
pump.lastCmdResult = commandResult;
pump.lastCmdTime = new Date(commandResult.completionTime);
MainApp.bus().post(new EventComboPumpUpdateGUI());
CommandResult reservoirQueryResult = ruffyScripter.readHistory(new PumpHistoryRequest().reservoirLevel(true));
pump.history = reservoirQueryResult.history;
MainApp.bus().post(new EventComboPumpUpdateGUI());
}
}