Skip to content

Commit

Permalink
Support Experience StandAlone mode
Browse files Browse the repository at this point in the history
  • Loading branch information
cybercop23 committed Jan 14, 2025
1 parent e68e7fc commit 299b041
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 11 additions & 1 deletion xLights/controllers/Experience.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,13 @@ Experience::Experience(std::string const& ip, std::string const& proxy) :
return;
}

wxJSONValue config;

if (!GetJSONData(GetConfigURL(), config)) {
logger_base.error("Error connecting to Genius controller on %s.", (const char*)_ip.c_str());
return;
}

if (data.Size() > 0) {
// decode controller type
_model = data["system"]["controller_model_name"].AsString();
Expand All @@ -177,6 +184,9 @@ Experience::Experience(std::string const& ip, std::string const& proxy) :
logger_base.error("Error connecting to Genius controller on %s.", (const char*)_ip.c_str());
DisplayError(wxString::Format("Error connecting to Genius controller on %s.", _ip).ToStdString());
}
if (config.Size() > 0) {
_opMode = config["system"]["operating_mode"].AsString();
}
}

#pragma endregion
Expand Down Expand Up @@ -227,7 +237,7 @@ int32_t Experience::SetInputUniverses(wxJSONValue& data, Controller* controller)
data["inputs"] = universes;
data["system"]["operating_mode"] = out->GetType() == OUTPUT_E131 ? wxString("e1.31") : wxString("artnet");
} else if (out->GetType() == OUTPUT_DDP) {
data["system"]["operating_mode"] = wxString("ddp");
data["system"]["operating_mode"] = wxString(_opMode);
DDPOutput* ddp = (DDPOutput*)out;
if (ddp->IsKeepChannelNumbers()) {
data["system"]["start_channel"] = startChannel;
Expand Down
1 change: 1 addition & 0 deletions xLights/controllers/Experience.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class Experience : public BaseController
int _numberOfRemoteOutputs{ 0 };
int _numberOfSerialOutputs{ 0 };
bool _has_efuses{ false };
std::string _opMode = "ddp";

#pragma endregion

Expand Down

0 comments on commit 299b041

Please sign in to comment.