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