You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
mpos_sdl_keyboard.py: catch exception in micropython.schedule
This commit is contained in:
@@ -370,7 +370,10 @@ class MposSDLKeyboard(keypad_framework.KeypadDriver):
|
||||
else:
|
||||
self.__current_state = self.RELEASED
|
||||
|
||||
micropython.schedule(MposSDLKeyboard.read, self)
|
||||
try:
|
||||
micropython.schedule(MposSDLKeyboard.read, self)
|
||||
except Exception as e:
|
||||
print(f"mpos_sdl_keyboard.py failed to call micropython.schedule: {e}")
|
||||
|
||||
def _get_key(self):
|
||||
return self.__current_state, self.__last_key
|
||||
|
||||
Reference in New Issue
Block a user