12 lines
233 B
Python
12 lines
233 B
Python
|
def process(self, state, key):
|
||
|
self.logger.warning(key)
|
||
|
if key.code == 1000:
|
||
|
reset(self)
|
||
|
|
||
|
|
||
|
def reset(self):
|
||
|
self.logger.debug('Rebooting to bootloader')
|
||
|
import machine
|
||
|
machine.bootloader()
|
||
|
return self
|