KDEAmbi/wledclient.h
Tobias J. Endres 24a94a4ab3 feat(wled-config-tool): Fix segfault, flickering, and add ASCII layout visualization
- Resolved persistent segmentation faults by correcting memory management and simplifying interactive input logic.
- Eliminated LED flickering by implementing a longer timeout in DNRGB packets and removing unnecessary refresh timers.
- Added an ASCII visualization of the LED layout to the terminal for better user feedback.
- Updated lessons_learned.md with detailed explanations of the problems and their solutions.
2025-08-16 02:04:09 +02:00

31 lines
615 B
C++

#ifndef WLEDCLIENT_H
#define WLEDCLIENT_H
#include <QObject>
#include <QUdpSocket>
#include <QHostAddress>
#include <QImage>
class WledClient : public QObject
{
Q_OBJECT
public:
explicit WledClient(QString host, ushort port, QObject *parent = nullptr);
~WledClient();
void sendImage(const QImage &image);
void setLedsColor(const QVector<QColor> &colors, int timeout = 1);
void flashLeds(int startIndex, int count, QColor color);
private:
QUdpSocket *_udpSocket;
QHostAddress _wledHost;
ushort _wledPort;
signals:
void error(QString message);
};
#endif // WLEDCLIENT_H