Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions www/daemon/worker.php
Original file line number Diff line number Diff line change
Expand Up @@ -1507,9 +1507,10 @@
workerLog('worker: DSI rotate: ' . $_SESSION['dsi_scn_rotate']);
workerLog('worker: --');
// Log Triggerhappy / USB volume knob on/off state
if (!isset($_SESSION['usb_volknob'])) {
$_SESSION['usb_volknob'] = '0';
}
// The service enable state is what persists across reboots, so refresh the
// session var from it rather than defaulting to off
$result = sysCmd('systemctl is-enabled triggerhappy 2>/dev/null');
$_SESSION['usb_volknob'] = (isset($result[0]) && $result[0] == 'enabled') ? '1' : '0';
workerLog('worker: Triggerhappy: ' . ($_SESSION['usb_volknob'] == '1' ? 'on' : 'off'));
// Start rotary encoder
if (!isset($_SESSION['rotaryenc'])) {
Expand Down