From 115685e0ab89c0dcd956466e4836ddfa77395d36 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 9 Aug 2026 14:04:49 -0400 Subject: [PATCH] Update pushbutton.py changed to hotspot_default --- pushbutton.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pushbutton.py b/pushbutton.py index 0451ed8f..35329e1b 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -12,7 +12,7 @@ import configparser def read_config_ini(): global hotspot_ssid global hotspot_password - global hotspot_always_on + global hotspot_default global web_term_hotspot global web_term_wifi # global dashboard_port @@ -26,7 +26,7 @@ def read_config_ini(): # Access the values like a dictionary hotspot_ssid = config['Hotspot']['hotspot_ssid'] hotspot_password = config['Hotspot']['hotspot_password'] - hotspot_always_on = config['Hotspot']['hotspot_hotspot_always_on'] + hotspot_default = config['Hotspot']['hotspot_default'] web_term_hotspot = config['Hotspot']['web_term_hotspot'] web_term_wifi = config['Hotspot']['web_term_wifi'] # dashboard_port = config.getint('Hotspot', 'dashboard_port') @@ -38,7 +38,7 @@ def read_config_ini(): print(" failed, setting defaults") hotspot_ssid = "CubeSat" hotspot_password = "amsatcubesat" - hotspot_always_on = "no" + hotspot_default = "no" web_term_hotspot = "yes" web_term_wifi = "no" # dashboard_port = 80 @@ -162,7 +162,7 @@ GPIO.output(powerPin, 0) GPIO.setup(push_button, GPIO.IN, pull_up_down=GPIO.PUD_UP) read_config_ini() -if not GPIO.input(push_button) or hotspot_always_on == "yes": # if pushbutton is held down during boot or configured always on +if not GPIO.input(push_button) or hotspot_default == "yes": # if pushbutton is held down during boot or configured as default print("Activating WiFi access point!", flush=True) GPIO.output(powerPin, 1) sleep(0.1)