示例#1
0
文件: acars.py 项目: 7h0ma5/mcdu
    def refresh(self):
        self.clear()

        self.field(0, "OUT", self.format_time(0))
        self.field(1, "OFF", self.format_time(1))
        self.field(2, "ON", self.format_time(2))
        self.field(3, "IN", self.format_time(3))
        self.field(5, "", "<RETURN", action=self.ret)

        Page.refresh(self)
示例#2
0
文件: acars.py 项目: 7h0ma5/mcdu
    def refresh(self):
        self.clear()

        if self.message:
            text = textwrap.wrap(self.message[3], 24)

            for i in range(5):
                if i < len(text):
                    self.field(i, "", text[i])

        self.field(5, "", "<RETURN", action=self.ret)
        Page.refresh(self)
示例#3
0
文件: acars.py 项目: 7h0ma5/mcdu
    def refresh(self):
        self.clear()

        messages = self.sys.messages
        for i in range(5):
            if i < len(messages):
                message = messages[i]
                self.field(i, message[0], message[2])
                self.field(i, "", message[1] + ">")

        self.field(5, "", "<RETURN", action=self.ret)
        Page.refresh(self)
示例#4
0
 def refresh(self):
     # Only show
     #        self.clear()
     print("Refreshing page !")
     j = 0
     n = len(self.sys.climbWinds)
     for i in range(n):
         item = u"{0:03d}\u00b0/{1:03d}/{2:5d}".format(
             self.sys.climbWinds[i].dir, self.sys.climbWinds[i].knots,
             self.sys.climbWinds[i].height)
         self.field_update(i, 0, item)
         j += 1
     print("Updating field ", j)
     self.field_update(j, 0, u"[   ]\u00b0/[   ]/[     ]")
     Page.refresh(self)
示例#5
0
 def refresh(self):
     self.clear()
     name, time, speed, alt, clr = self.getItem(0)
     self.field(0,
                "FROM                    TIME",
                name + "     " + time,
                color=clr)
     self.field(0, "SPD/ALT                ", speed + "/" + alt, color=clr)
     for i in range(1, 5):
         name, time, speed, alt, clr = self.getItem(i)
         self.field(i, "", name + "     " + time, color=clr)
         if speed == "" and alt == "":
             self.field(i, "", "")
         else:
             self.field(i, "", speed + "/" + alt, color=clr)
     Page.refresh(self)