GUI Version 4.1 CHanges are GB sticker and Updated API call from Internal Config to GLOBAL--FlexiApplication.
This commit is contained in:
41
AiQ_GUI.cs
41
AiQ_GUI.cs
@@ -273,6 +273,8 @@ namespace AiQ_GUI
|
||||
await AllocateSerial();
|
||||
else if (GoogleAPI.UpdateSpreadSheetRePreTest(CameraAccessInfo.SpreadsheetID, Vers) != "OK") // If rerun might be different values so update SS
|
||||
AddToActionsList("Failed to write to spreadsheet, please check manually");
|
||||
// else if (Excel.UpdateSpreadSheetPreTest(CameraAccessInfo.SpreadsheetID, Vers, CamOnTest.GetCamDesc(), CamOnTest.Model) != "OK")
|
||||
// AddToActionsList("Failed to write to spreadsheet, please check manually");
|
||||
}
|
||||
else // No serial or model so allocate one
|
||||
await AllocateSerial();
|
||||
@@ -721,7 +723,7 @@ namespace AiQ_GUI
|
||||
|
||||
// Set serial and model into camera
|
||||
string[,] TEST_JSON = { { "propSerialNumber", NewSerial }, { "propMavModelNumber", CamOnTest.Model } };
|
||||
string JSONResponse = await FlexiAPI.HTTP_Update("Internal Config", CamOnTest.IP, TEST_JSON);
|
||||
string JSONResponse = await FlexiAPI.HTTP_Update("GLOBAL--FlexiApplication", CamOnTest.IP, TEST_JSON);
|
||||
|
||||
if (!JSONResponse.Contains(NewSerial) || !JSONResponse.Contains(CamOnTest.Model))
|
||||
{
|
||||
@@ -1712,12 +1714,43 @@ 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();
|
||||
|
||||
|
||||
//FakeCamera fakeCamera = new FakeCamera(80); // Create an instance of FakeCamera
|
||||
|
||||
////CamOnTest.IP = CbBxFoundCams.Text;
|
||||
//_ = fakeCamera.StartAsync(CAMTYPE.GOOD).ContinueWith(task =>
|
||||
//{
|
||||
// //Network.Initialize("developer", "Pass123");
|
||||
|
||||
// if (task.IsFaulted)
|
||||
// {
|
||||
// AddToActionsList("Error starting FakeCamera: " + task.Exception?.Message);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// AddToActionsList($"FakeCamera started successfully. IP: {fakeCamera}", false);
|
||||
// }
|
||||
//});
|
||||
|
||||
//await Task.Delay(3000); // Wait for server to start
|
||||
//CbBxFoundCams.Text = "localhost"; // Should force update in creds an network reinit
|
||||
//CmBoFoundCams_TextChanged(sender, e);
|
||||
//CbBxCameraType.SelectedIndex = CbBxCameraType.Items.Count - 1; // Selects AB12CD as model number
|
||||
|
||||
//await Task.Delay(3000); // Wait for server to start
|
||||
|
||||
//BtnPreTest_Click(sender, e);
|
||||
|
||||
|
||||
Teams.SendMssg("10", "Test User");
|
||||
|
||||
|
||||
stopWatchTest.Stop();
|
||||
AddToActionsList("RunTime " + stopWatchTest.Elapsed.ToString(@"hh\:mm\:ss\.ff"));
|
||||
|
||||
Reference in New Issue
Block a user