Files
Button/CMakeLists.txt
T
GrigoandClaude Opus 5.5 d71fa812da Display/GUI watchdog for the "backlight on, no picture" failure
On PoE sites the MIPI-DSI panel can lose its init on a supply dip while the
RK3566 keeps running; the UI may also hang or exit. Three layers:

- hardware watchdog: systemd RuntimeWatchdogSec=20s (system.conf.d)
- GUI: SdWatchdog pings systemd per swapped frame (WATCHDOG_USEC=30s, enabled
  by the binary so older versions run under the same unit) and writes
  run/qt.frame; buttontask.service gets Restart=always, NotifyAccess=main,
  TimeoutAbortSec=10s
- bt-displaywatch (root, buttontask-displaywatch.service): kernel DRM/DSI
  timeouts, eth link down->up (PoE dip hint), stale UI frames, restart storms
  -> panel re-init (stop UI, fb0 blank 4->0, start UI), repeated -> reboot
  (max 3/day, never during OTA); incident log in /var/log/buttontask/

Manual recovery: hold one finger 10 s in the bottom-left corner (panels are
single-touch). Delivered by OTA via bt-update sync_system; the web service
runs `bt-update sync-system` at start for devices updated by an older
bt-update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 07:10:10 +00:00

96 lines
2.2 KiB
CMake

cmake_minimum_required(VERSION 3.10)
project(ButtonTask VERSION 2.5 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
find_package(Qt5 5.9 REQUIRED COMPONENTS Core Quick Qml Network)
set(SOURCES
main.cpp
src/configmanager.cpp
src/configmanager.h
src/buttonsmodel.cpp
src/buttonsmodel.h
src/buttoncontroller.cpp
src/buttoncontroller.h
src/responsecheck.cpp
src/responsecheck.h
src/settingscontainer.cpp
src/settingscontainer.h
src/systeminfo.cpp
src/systeminfo.h
src/sensorsbridge.cpp
src/sensorsbridge.h
src/uiidlewatch.cpp
src/uiidlewatch.h
src/sdwatchdog.cpp
src/sdwatchdog.h
src/recoverygesture.cpp
src/recoverygesture.h
)
set(RESOURCES
resources/qml.qrc
resources/icons.qrc
)
add_executable(ButtonTask ${SOURCES} ${RESOURCES})
target_include_directories(ButtonTask PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src
)
target_link_libraries(ButtonTask PRIVATE
Qt5::Core
Qt5::Quick
Qt5::Qml
Qt5::Network
)
include(GNUInstallDirs)
install(TARGETS ButtonTask
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
install(FILES config/config.json
DESTINATION ${CMAKE_INSTALL_BINDIR}/config
)
install(DIRECTORY resources/default-icons/
DESTINATION ${CMAKE_INSTALL_BINDIR}/icons
FILES_MATCHING PATTERN "*.png" PATTERN "*.jpg"
)
install(DIRECTORY webconfig/
DESTINATION share/buttontask/webconfig
)
install(DIRECTORY collector/
DESTINATION share/buttontask/collector
PATTERN "__pycache__" EXCLUDE
PATTERN "wheels/*.whl" EXCLUDE
)
# Privileged helper scripts (network + OTA). Installed with execute perms so
# they work even when the source tree was checked out on a non-POSIX host.
install(PROGRAMS
webconfig/scripts/bt-netconfig
webconfig/scripts/bt-update
webconfig/scripts/bt-service
webconfig/scripts/bt-access
webconfig/scripts/bt-brightness
webconfig/scripts/bt-settime
webconfig/scripts/bt-reboot
webconfig/scripts/make-package.sh
DESTINATION share/buttontask/scripts
)
install(FILES webconfig/scripts/buttontask.sudoers
DESTINATION share/buttontask/scripts
)