utils.MainIf: rename 'getip' to 'poll'

+ change mechanism for getting hostname
This commit is contained in:
2024-03-06 15:22:25 +01:00
parent 947a15e3fa
commit d6e68aef7d
2 changed files with 39 additions and 26 deletions

View File

@ -234,7 +234,7 @@ class Display:
self.send(SET_COLOR, 0, 0, 0, 11 + self.blink) # yellow / blue
self.text('.', 0, dotpos, dotpos+1)
self.color()
self.text(mainif.hostname or self.hostname, 1)
self.text(mainif.hostname() or self.hostname, 1)
# self.event.set()
self.blink = not self.blink
else:
@ -242,7 +242,7 @@ class Display:
self.show('(cancel)(reboot)(shdown)')
def refresh(self):
mainif.getip()
mainif.poll()
func = self.menu or self.net_display
func(self.gettouch())