update raspberry pi code

This commit is contained in:
nono
2025-10-16 18:35:57 +02:00
committed by n07070
parent 20a22b379d
commit 5207fa5b4e
2 changed files with 66 additions and 46 deletions

View File

@@ -77,10 +77,14 @@ printer = Printer(app,0x04b8, 0x0e28)
printer.init_printer()
# Find out if we are running on a Raspberry Pi
rpi = Raspberry(printer, app, socketio, configuration_file['rpi']['button_gpio_port_number'], configuration_file['rpi']['indicator_gpio_port_number'], configuration_file['rpi']['flash'] )
rpi = Raspberry(printer,
app,
socketio,
configuration_file['rpi']['button_gpio_port_number'], configuration_file['rpi']['indicator_gpio_port_number'],
configuration_file['rpi']['flash_gpio_port_number'],
configuration_file['rpi']['flash'] )
RASPBERRY_PI_CONNECTED = rpi.is_raspberry_pi()
if RASPBERRY_PI_CONNECTED:
rpi.initialise_gpio()
#############################################################
@@ -91,7 +95,7 @@ if RASPBERRY_PI_CONNECTED:
web = Web(app, printer)
if __name__ == "__main__":
app.run(ssl_context='adhoc')
app.run(debug=True, use_reloader=False, host='0.0.0.0', ssl_context='adhoc')
limiter = Limiter(
get_remote_address,