Mobile API Refactoring
• Introduced new Mobile API.cs module • Encapsulates firmware checks, day/night mode switching, and snapshot operations • Methods: CheckFirmwareAsync(), SetDayModeAsync(), SetNightModeAsync() • Improves code maintainability and separates API logic from test execution UI Components • DayImgPcbx PictureBox: Displays day snapshot • NightImgPcbx PictureBox: Displays night snapshot • DayImage Label: Shows day luminance percentage • NightImage Label: Shows night luminance percentage Features Implemented • Luminance-based validation: Uses ImageProcessing.GetMeanLuminance() to quantitatively analyze day and night snapshots • Validation logic: Day luminance must exceed night luminance to pass the test • Real-time luminance display: Appends calculated luminance percentages (0-100%) to day and night image labels • Enhanced error reporting: Logs detailed luminance values when test fails for debugging purposes • Captures day mode snapshot → Analyzes luminance • Captures night mode snapshot → Analyzes luminance • Compares values and updates UI labels with percentages • Result: "Day/Night Mode = Passed" (green) or "Day/Night Mode = Failed" (red) with error details
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using AiQ_GUI.AiQ_Tests;
|
||||
using AiQ_GUI.Mobile_Tests;
|
||||
using LibVLCSharp.Shared;
|
||||
using LibVLCSharp.WinForms;
|
||||
using Newtonsoft.Json;
|
||||
@@ -1449,10 +1450,12 @@ namespace AiQ_GUI
|
||||
//StatsExcel excelExporter = new();
|
||||
//excelExporter.ExportDatabaseToExcel();
|
||||
//await MobilePreTest.CheckFirmwareAsync();
|
||||
|
||||
|
||||
VLC.Play(VidView);
|
||||
await Task.Delay(5000);
|
||||
VLC.TakeSnapshot(VidView);
|
||||
//VLC.TakeSnapshot(VidView);
|
||||
|
||||
await MobileAPI.SetDayModeAsync();
|
||||
|
||||
AddToActionsList("RunTime " + stopWatchTest.Elapsed.ToString(@"hh\:mm\:ss\.ff"), Level.LOG);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user