#Region Project Attributes
#AutoFlushLogs: True
#CheckArrayBounds: True
#StackBufferSize: 300
#End Region
Sub Process_Globals
Public Serial1 As Serial
Type System_Type (Resets As UInt, Sommerzeit As Boolean)
Type WLAN_Type (IP As String, SSID As String, Password As String, Chanel As Byte, BSSID As String)
Type Einstellungen (System As System_Type, WLAN As WLAN_Type)
Public Settings As Einstellungen
Private System1 As System_Type
Private WLAN1 As WLAN_Type
Settings.System = System1
Settings.WLAN = WLAN1
Settings.System.Resets = 0
Settings.System.Sommerzeit = True
Settings.WLAN.IP = "192.168.0.170"
Settings.WLAN.SSID = "Wireless1"
Settings.WLAN.Password = "@Oktober160"
Settings.WLAN.Chanel = 1
Settings.WLAN.BSSID = "CCCE1E1DC20B"
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")
'Debug complete
Log ("Settings.System.Resets = 0: ", Settings.System.Resets)
Log ("Settings.System.Sommerzeit = True: ", Settings.System.Sommerzeit)
Log ("WLAN.IP = ""192.168.0.170"": = " , Settings.WLAN.IP)
Log ("WLAN.SSID = ""Wireless1"": = " , Settings. WLAN.SSID)
Log ("WLAN.Password = ""@Oktober160"": = " , Settings.WLAN.Password)
Log ("WLAN.Chanel = 1: = " , Settings.WLAN.Chanel)
Log ("WLAN.BSSID = ""CCCE1E1DC20B"": = " , Settings.WLAN.BSSID)
'Debug
Log ("1. WLAN1.IP = ""192.168.0.170"": ", Settings.WLAN.IP)
'Change the IP
Settings.WLAN.IP = "192.168.0.171"
Log ("2. WLAN1.IP = ""192.168.0.171"": ", Settings.WLAN.IP)
' test(0) 'It works, because the Sub "AppStart" in not finished and the Variables are not destroyed
CallSubPlus ("test", 100, 0)
End Sub
Sub test (Tag As Byte)
Log ("3. WLAN1.IP = ""192.168.0.171"": ", Settings.WLAN.IP)
End Sub