예제 #1
0
                                10,
                                color=(255, 0, 0),
                                alpha=200)
        ui.canvas.draw_string(pos[0] + 10,
                              pos[1] + 10,
                              "Welcome to MaixUI",
                              scale=2,
                              color=(0, 0, 0))
        ui.display()

    def event():
        __class__.ctrl.cycle()


if __name__ == "__main__":
    container.reload(launcher)
    while True:
        while True:
            last = time.ticks_ms() - 1
            while True:
                try:
                    #time.sleep(0.1)
                    print(1000 // (time.ticks_ms() - last), 'fps')
                    last = time.ticks_ms()

                    gc.collect()
                    container.forever()
                    system.parallel_cycle()

                    protect.keep()
                    #gc.collect()
예제 #2
0
 def show_message(self):
     container.reload(slide_view)
     self.remove(show_message)
예제 #3
0
 def into_launcher(self):
   container.reload(launcher)
   self.remove(into_launcher)
예제 #4
0
    #@ui.warp_template(ui.anime_in_draw)
    #@ui.warp_template(taskbar.time_draw)
    #@ui.warp_template(taskbar.mem_draw)
    #@catch # need sipeed_button
    def draw():
        ui.display()

    def event():
        self = __class__
        self.ctrl.parallel_cycle()


if __name__ == "__main__":

    system = agent()
    container.reload(shift_view)

    while True:
        while True:
            last = time.ticks_ms() - 1
            while True:
                print(1000 // (time.ticks_ms() - last), 'fps')
                last = time.ticks_ms()
                try:
                    gc.collect()
                    container.forever()
                    system.parallel_cycle()
                    protect.keep()
                    #gc.collect()
                    #print_mem_free()
                    #time.sleep(0.05)
예제 #5
0
  @ui.warp_template(ui.help_in_draw)
  def draw():
    ui.display()

  def event():
    self = __class__
    if self.h < 240:
      self.h += 10
    if self.w < 240:
      self.w += 10
    ui.height, ui.weight = self.h, self.w
    self.ctrl.parallel_cycle()

if __name__ == "__main__":
  system = agent()
  container.reload(loading)

  last = time.ticks_ms()
  while True:
    while True:
      last = time.ticks_ms() - 1
      while True:
        try:
          #time.sleep(0.1)
          #print(1000 // (time.ticks_ms() - last), 'fps')
          last = time.ticks_ms()

          gc.collect()
          container.forever()
          system.parallel_cycle()