Prevent OS sleep and display blanking while SDR is running

Add PowerInhibit.pas with InhibitSleep/UninhibitSleep:
- Windows: SetThreadExecutionState (kernel32, no child process)
- macOS: caffeinate -d -i -s -w <PID> (auto-exits on crash via -w flag)
- Linux: systemd-inhibit with kill-0 poll loop (releases within 5s on crash)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-31 21:33:30 +03:00
co-authored by Claude Sonnet 4.6
parent 655d242d02
commit 83ec28f997
3 changed files with 120 additions and 1 deletions
+4
View File
@@ -229,6 +229,10 @@
<Filename Value="PlatformUtils.pas"/>
<IsPartOfProject Value="True"/>
</Unit>
<Unit>
<Filename Value="PowerInhibit.pas"/>
<IsPartOfProject Value="True"/>
</Unit>
<Unit>
<Filename Value="BoardUtils.pas"/>
<IsPartOfProject Value="True"/>