Skip to content
Open
Show file tree
Hide file tree
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
12 changes: 11 additions & 1 deletion include/led-drivers/net/DriverNetNanoleaf.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,16 @@ class DriverNetNanoleaf : public ProviderUdp
private:
bool initRestAPI(const QString& hostname, int port, const QString& token);
bool initLedsConfiguration();
bool loadPanelIds(const QJsonArray& positionData);
bool loadLightstripIds(int ledCount);
bool applyConfiguredLedRange();
int queryNumLeds();
int writeStreamBatch(const std::vector<ColorRgb>& ledValues, int startIndex, int count, int& ledCounter);
QJsonDocument changeToExternalControlMode();
bool applyStreamMasterBrightness();
QString getOnOffRequest(bool isOn) const;
ColorRgb candyColor(const ColorRgb& color) const;
bool resolveApiEndpoint(const QString& host, QString& apiHost, int& apiPort) const;

std::unique_ptr<ProviderRestApi> _restApi;

Expand All @@ -49,9 +57,11 @@ class DriverNetNanoleaf : public ProviderUdp
ushort _extControlVersion;

int _panelLedCount;
bool _isLightstrip;
int _streamLedsPerDatagram;
int _streamBatchGapMs;

QVector<int> _panelIds;

static bool isRegistered;
};

Loading