Added lights panel tab to send LED commands. However we can not get in-game lighting as its on the socket not websocket. More reason for the bridge

This commit is contained in:
Jon ESA
2026-04-02 11:14:36 +01:00
parent 3dc9ee91d4
commit 9671785a14
7 changed files with 362 additions and 1 deletions

View File

@@ -21,6 +21,7 @@
#include "GamesPanel.h"
#include "LogPanel.h"
#include "LightsPanel.h"
#include "PanelsPanel.h"
#include "PowerPanel.h"
#include "SettingsTree.h"
@@ -284,6 +285,15 @@ static QWidget *makeLogsTab(WebSocketController *ctrl, QWidget *parent)
return panel;
}
static QWidget *makeLightsTab(WebSocketController *ctrl, QWidget *parent)
{
auto *panel = new LightsPanel(parent);
ctrl->setLightsPanel(panel);
QObject::connect(panel, &LightsPanel::commandRequested,
ctrl, &WebSocketController::sendCommand);
return panel;
}
static QWidget *makePanelsTab(WebSocketController *ctrl, QWidget *parent)
{
auto *panel = new PanelsPanel(parent);
@@ -375,6 +385,7 @@ int main(int argc, char *argv[])
tabs->addTab(makePowerTab (ctrl, &window), "Power");
tabs->addTab(makeLogsTab (ctrl, &window), "Logs");
tabs->addTab(makePanelsTab (ctrl, &window), "Panels Impacts");
tabs->addTab(makeLightsTab (ctrl, &window), "Panel Lights");
mainLayout->addWidget(tabs, 1);
// --- Shutdown inline confirm ---