Add Reset and Detect buttons to Config dialog
All checks were successful
Build / build (push) Successful in 9h0m7s
Build and Release / build (push) Successful in 9h0m12s

- Reset button: clears custom labels, unhides all ports, removes discovered ports
- Detect button: tries common VCP 60 values to discover available input ports
- Version bumped to 1.1.2

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-10 02:41:42 -05:00
parent 0c860d19ea
commit fc3ebe14be
7 changed files with 198 additions and 17 deletions

View File

@@ -39,17 +39,21 @@ public static class CMMCommand
CMMexe,
$"/GetValue {monitorSN} {vcpCode}");
// Empty result means timeout - don't retry, monitor is unresponsive
if (string.IsNullOrEmpty(output) && exitCode == -1)
// Timeout
if (exitCode == -1)
return string.Empty;
// Parse output - ControlMyMonitor outputs the value directly
var value = output?.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries).LastOrDefault()?.Trim();
// ControlMyMonitor returns the value as the exit code
// Exit code > 0 means success with that value
if (exitCode > 0)
return exitCode.ToString();
if (!string.IsNullOrEmpty(value) && exitCode == 0)
// Also check stdout in case it outputs there
var value = output?.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries).LastOrDefault()?.Trim();
if (!string.IsNullOrEmpty(value) && value != "0")
return value;
// Only retry on non-timeout failures
// Only retry on failure
if (attempt < maxRetries)
await Task.Delay(300);
}