-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTest3.py
124 lines (100 loc) · 4.12 KB
/
Test3.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
import threading
import asyncio
from Libraries.BRS_Python_Libraries.BRS.Utilities.Enums import Execution
from Libraries.BRS_Python_Libraries.BRS.Debug.consoleLog import Debug
from Libraries.BRS_Python_Libraries.BRS.Network.WiFi.WiFi import CanDeviceUseWiFi, GetWiFiNetworks
# result = CanDeviceUseWiFi()
# result = True
# networks = [
# {
# "ssid" : "wifi_name",
# "strength" : 50,
# "bssid" : "c0:3c:04:2a:62:ec",
# "mode" : None,
# },
# {
# "ssid" : "Batiscan",
# "strength" : 100,
# "bssid" : "aa:bb:cc:dd:ee:ff",
# "mode" : None,
# }
# ]
# if(result != True):
# Debug.Log("WiFi networks cannot be accessed.")
# anim = Animation(pos_hint = {"center_x":0.5, "center_y":0.45}, t="in_out_back")
# anim.start(self.NoWiFiCard)
# KontrolRGB.DisplayMinorProblem()
# else:
# Debug.Log("Wifi can be accessed")
# Debug.Log("Getting WiFi networks")
# networks = GetWiFiNetworks()
# Debug.Log("Configurating WiFiLogin Screens.")
# WiFiLogin_Screens.SetBadExiter(NetworkMenu_Screens, "NetworkMenu")
# WiFiLogin_Screens.SetGoodExiter(NetworkMenu_Screens, "NetworkMenu")
#
# if(networks == Execution.Failed):
# Debug.Error("Fatal error when getting available networks.")
# Debug.Log("WiFi networks cannot be accessed.")
# anim = Animation(pos_hint = {"center_x":0.5, "center_y":0.45}, t="in_out_back")
# anim.start(self.NoWiFiCard)
# KontrolRGB.DisplayUserError()
# Debug.End()
# return
# if(networks == Execution.Crashed):
# Debug.Error("Fatal error when getting available networks.")
# Debug.Log("WiFi networks cannot be accessed.")
# anim = Animation(pos_hint = {"center_x":0.5, "center_y":0.45}, t="in_out_back")
# anim.start(self.NoWiFiCard)
# KontrolRGB.DisplayUserError()
# Debug.End()
# return
# if(networks == Execution.Incompatibility):
# Debug.Error("Fatal error when getting available networks.")
# Debug.Log("WiFi networks cannot be accessed.")
# anim = Animation(pos_hint = {"center_x":0.5, "center_y":0.45}, t="in_out_back")
# anim.start(self.NoWiFiCard)
# KontrolRGB.DisplayUserError()
# Debug.End()
# return
# Debug.Log("Creating WiFi network cards.")
# for network in networks:
# WiFiCard = WiFiSelectionCard(network)
# WiFiCard.PressedEnd = self.GoToWiFiConnectionScreen
# self.cardBox.add_widget(WiFiCard)
import time
print("\n\n\n\n")
print(">>> START")
AsyncGetNearbyNetworks(WiFiProgress)
print(">>> END")
time.sleep(5)
print(f"Result = {WiFiProgress.status}")
print("\n\n\n\n")
# from kivy.lang import Builder
# from kivymd.app import MDApp
# from kivymd.uix.behaviors import TouchBehavior
# from kivymd.uix.button import MDRaisedButton
# KV = '''
# Screen:
# MyButton:
# text: "PRESS ME"
# pos_hint: {"center_x": .5, "center_y": .5}
# '''
# class MyButton(MDRaisedButton, TouchBehavior):
# def on_long_touch(self, *args):
# print("<on_long_touch> event")
# def on_double_tap(self, *args):
# print("<on_double_tap> event")
# def on_triple_tap(self, *args):
# print("<on_triple_tap> event")
# def on_release(self, *args):
# print("<on_release> event")
# def on_release(self, *args):
# print("<on_release> event")
# def on_press(self, *args):
# print("<on_press> event")
# from Local.Drivers.Batiscan.Programs.Communications.UDP import BatiscanUDP
# BatiscanUDP._NoConnection()
# class MainApp(MDApp):
# def build(self):
# return Builder.load_string(KV)
# MainApp().run()