Skip to content

Commit

Permalink
Merge pull request #51 from Open-STEM/WebserverSmallFixes
Browse files Browse the repository at this point in the history
Small fixes for the webserver
  • Loading branch information
bradamiller authored Aug 16, 2023
2 parents b6794a9 + 3646976 commit 54cf711
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions XRPLib/webserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def __init__(self):
self.FUNCTION_PREFIX = "startfunction"
self.FUNCTION_SUFFIX = "endfunction"
self.display_arrows = False
# Instantiate self.wlan now so that running stop before start doesn't cause an error
self.wlan = network.WLAN(network.STA_IF)

def start_network(self, ssid:str=None, robot_id:int= None, password:str=None):
"""
Expand All @@ -58,6 +60,8 @@ def start_network(self, ssid:str=None, robot_id:int= None, password:str=None):
robot_id = 1
ssid = f"XRP_{robot_id}"
password = "remote.xrp"
if password is not None and len(password) < 8:
logging.warning("Password is less than 8 characters, this may cause issues with some devices")
self.access_point = access_point(ssid, password)
logging.info(f"Starting Access Point \"{ssid}\"")
self.wlan = network.WLAN(network.AP_IF)
Expand Down

0 comments on commit 54cf711

Please sign in to comment.