def _item_add_finish(self, name): remaining = 750 overage = 0.25 for lastfeed in SupplyFeed.getAllOrdered(): remaining = lastfeed.remaining overage = lastfeed.pulse_overage feed = SupplyFeed("Misc", name, remaining=remaining, overage=overage) self.master.save_configs() self.update_listbox() self.master.screen_pop() self.master.screen_push(FeedEditScreen(self.master, feed))
def _item_add_finish(self, name): flowrate = 14.2 overage = 0.25 for lastfeed in SupplyFeed.getAllOrdered(): flowrate = lastfeed.flowrate overage = lastfeed.pulse_overage feed = SupplyFeed("Misc", name, flowrate=flowrate, overage=overage) self.master.save_configs() self.update_listbox() self.master.screen_pop() self.master.screen_push(FeedEditScreen(self.master, feed))
def _get_items(self): return [{ "name": "#%d %s" % (feed.motor_num, feed.getName()), "data": feed, "fgcolor": None if feed.avail else "#700", } for feed in SupplyFeed.getAllOrdered()]