debug
This commit is contained in:
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"python.pythonPath": "C:\\Program Files\\Python38\\python.exe"
|
||||
}
|
||||
+25
-24
@@ -130,33 +130,34 @@ def click_b3(channel):
|
||||
main_fun(BTN2_PIN)
|
||||
|
||||
def click_b2(channel):
|
||||
global aplist
|
||||
global idxWin
|
||||
global idxLen
|
||||
global start
|
||||
global vert
|
||||
global test
|
||||
|
||||
start = time.time()
|
||||
|
||||
if apIndx >= 0:
|
||||
main_fun(998)
|
||||
#print ''.join(pwdLst) #TODO change password for real...
|
||||
start = stamp - SCREEN_SAVER + 5
|
||||
global apIndx
|
||||
global chaSel
|
||||
if state == BTN3_PIN:
|
||||
apIndx = -1
|
||||
if vert == 1:
|
||||
if horz == 1:
|
||||
main_fun(995)
|
||||
os.system("# enable hotspot")
|
||||
else:
|
||||
main_fun(996)
|
||||
os.system("# disable hotspot")
|
||||
elif vert == 2:
|
||||
main_fun(997)
|
||||
os.system("")
|
||||
start = stamp - SCREEN_SAVER + 5
|
||||
else:
|
||||
main_fun(BTN1_PIN)
|
||||
else:
|
||||
result = os.popen("iwlist {0} scan 2>/dev/null | grep '^..*ESSID:\"..*\"$' | sed 's/^.*ESSID:\"\\(..*\\)\".*$/\\1/'".format(iface)).read()
|
||||
aplist = result.splitlines()
|
||||
|
||||
idxLen = len(aplist)
|
||||
if (idxWin + SCREEN_LINES) > idxLen:
|
||||
idxWin = idxLen - SCREEN_LINES
|
||||
if idxWin < 0:
|
||||
idxWin = 0
|
||||
|
||||
if vert > idxLen:
|
||||
vert = idxLen
|
||||
|
||||
main_fun(channel)
|
||||
if apIndx < 0:
|
||||
vert = 3 # Default
|
||||
main_fun(BTN3_PIN)
|
||||
else:
|
||||
if chaSel < 2:
|
||||
chaSel = chaSel + 1
|
||||
pwdLst[horz] = choices[chaSel][vert]
|
||||
main_fun(BTN2_PIN)
|
||||
|
||||
def select_h(channel):
|
||||
global apIndx
|
||||
|
||||
Reference in New Issue
Block a user