V4.4 with modified god mode and 211 at end of soak test.
This commit is contained in:
26
AiQ_GUI.cs
26
AiQ_GUI.cs
@@ -1596,20 +1596,16 @@ namespace AiQ_GUI
|
||||
continue;
|
||||
try
|
||||
{
|
||||
Network.Initialize("developer", SCL.DevPass); // Ensure network is initialized to the right camera
|
||||
await CameraModules.FactoryResetModules(SCL.IP); // Reset camera modules
|
||||
await FlexiAPI.HTTP_Update("GLOBAL--FlexiApplication", SCL.IP, GOD_JSON);
|
||||
await FlexiAPI.HTTP_Update("GLOBAL--NetworkConfig", SCL.IP, Network_JSON);
|
||||
AddToActionsList($"Setting 211 & God Mode off for camera {SCL.IP}", false);
|
||||
Network.Initialize("developer", SCL.DevPass); // Ensure network is initialized to the right camera
|
||||
await CameraModules.FactoryResetModules(SCL.IP); // Reset camera modules
|
||||
|
||||
string[,] godJson = { { "propGodMode", "false" } }; // Set God mode explicitly off
|
||||
string GOD = await FlexiAPI.HTTP_Update("GLOBAL--FlexiApplication", SCL.IP, godJson);
|
||||
string GOD = await FlexiAPI.HTTP_Update("GLOBAL--FlexiApplication", SCL.IP, GOD_JSON);
|
||||
if (GOD.Contains("Error"))
|
||||
throw new Exception("Could not set God mode off");
|
||||
|
||||
// Update GLOBAL--NetworkConfig with fixed IP and turn off DHCP
|
||||
string[,] TEST_JSON = { { "propDHCP", "false" }, { "propHost", "192.168.1.211" }, { "propNetmask", "255.255.255.0" }, { "propGateway", "192.168.1.1" } };
|
||||
await FlexiAPI.HTTP_Update("GLOBAL--NetworkConfig", SCL.IP, TEST_JSON);
|
||||
await FlexiAPI.HTTP_Update("GLOBAL--NetworkConfig", SCL.IP, Network_JSON);
|
||||
i--; // Decriment count becuase they will stack into 211
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -1621,13 +1617,13 @@ namespace AiQ_GUI
|
||||
await Task.Delay(5000); // Wait for 5 seconds to allow the camera to restart
|
||||
IList<string> FoundCams = await Network.SearchForCams(); // Have to check via broadcast becuase Ping sometimes fails across subnets
|
||||
|
||||
if (FoundCams.Count == i && FoundCams.Contains("192.168.1.211")) // Check the right number of cameras are seen
|
||||
if ((FoundCams.Count == i && FoundCams.Contains("192.168.1.211")) || FoundCams.Count == 1)
|
||||
{
|
||||
// GOOD??
|
||||
AddToActionsList("All cameras successfully changed to 211.", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// BAD??
|
||||
AddToActionsList($"Some cameras failed: Found {FoundCams.Count}, expected {i}.", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1747,13 +1743,15 @@ namespace AiQ_GUI
|
||||
}
|
||||
|
||||
// ***** Test & Debug *****
|
||||
private void BtnTest_Click(object sender, EventArgs e)
|
||||
private async void BtnTest_Click(object sender, EventArgs e)
|
||||
{
|
||||
Stopwatch stopWatchTest = Stopwatch.StartNew();
|
||||
|
||||
StatsExcel excelExporter = new();
|
||||
excelExporter.ExportDatabaseToExcel();
|
||||
//StatsExcel excelExporter = new();
|
||||
//excelExporter.ExportDatabaseToExcel();
|
||||
|
||||
string ans = await FlexiAPI.HTTP_Fetch("GLOBAL--Device", "192.168.0.71");
|
||||
AddToActionsList(ans);
|
||||
// /api/config-ids - For getting all available config IDs
|
||||
|
||||
stopWatchTest.Stop();
|
||||
|
||||
Reference in New Issue
Block a user