Ejemplo n.º 1
0
def printWAresult(path):
    fbink_cfg.row = 0
    fbink_cfg.col = 0
    #Clear screen
    FBInk.fbink_cls(fbfd, fbink_cfg)
    #display_results
    FBInk.fbink_print_image(fbfd, path, 0, 0, fbink_cfg)
    #Display keyboard icon
    FBInk.fbink_print_image(fbfd, "./keyboard_icon.png", 10, 10, fbink_cfg)
Ejemplo n.º 2
0
    def update(self):
        try:
            self.current = self.weather.get_weather_current()
            self.forecast = self.weather.get_weather_forecast()
        except Exception as e:
            # Something went wrong while getting API Data, try again later.
            print("Failed to get weather data:\r\n" + str(e))
            return
        image = self._create_image()
        print("Drawing image")
        rect = ffi.new("FBInkRect *")
        rect.top = 0
        rect.left = 0
        rect.width = 0
        rect.height = 0
        fbink.fbink_cls(self.fbfd, self.fbink_cfg, rect, 0)

        fbink.fbink_print_image(self.fbfd, image, 0, 0, self.fbink_cfg)
Ejemplo n.º 3
0
filePath = "result.png"
isKeyboardMode = True
runeStr = ""
upperCase = False

# INITIALIZING DISPLAY
fbink_cfg = ffi.new("FBInkConfig *")
fbfd = FBInk.fbink_open()
FBInk.fbink_init(fbfd, fbink_cfg)
#Get screen infos
state = ffi.new("FBInkState *")
FBInk.fbink_get_state(fbink_cfg, state)
display_width = state.screen_width
screenHeight = state.screen_height
#Clear screen
FBInk.fbink_cls(fbfd, fbink_cfg)

# INITIALIZING TOUCH
touchPath = "/dev/input/event1"
t = KIP.inputObject(touchPath, 1080, 1440)

# INITIALIZING APP
vk = printKeyboard()
printHelp()

while True:
    (x, y, err) = t.getInput()
    if isKeyboardMode:
        if err != None:
            continue
        k = vk.getPressedKey(x, y)
Ejemplo n.º 4
0
def do_screen_clear():
    FBInk.fbink_cls(fbfd, fbink_cfg)