Skip to content

Commit

Permalink
Update the Lua docs and change the cmd getFseqDir to match current co…
Browse files Browse the repository at this point in the history
…nvention
  • Loading branch information
derwin12 committed Jan 16, 2025
1 parent 4fe5b56 commit a60f4d5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
14 changes: 13 additions & 1 deletion documentation/xlDo Commands.txt
Original file line number Diff line number Diff line change
Expand Up @@ -388,4 +388,16 @@ Command
{"cmd":"setModelProperty","model":"model name","key":"Controller","data":"Yard"}
{"cmd":"setModelProperty","model":"model name","key":"ModelControllerConnectionPort","data":"5"}
Response
{"res":200, "msg":"Set Model Property.","worked":"true"}
{"res":200, "msg":"Set Model Property.","worked":"true"}

Get current show folder.
Command
{"cmd":"getShowFolder"}
Response
{"res":200, "folder":"c:\\"}

Get the fseq directory from preferences.
Command
{"cmd":"getFseqDirectory"}
Response
{"res":200, "folder":"c:\\"}
5 changes: 2 additions & 3 deletions xLights/automation/xLightsAutomations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1119,9 +1119,8 @@ bool xLightsFrame::ProcessAutomation(std::vector<std::string> &paths,
_outputModelManager.AddASAPWork(OutputModelManager::WORK_RELOAD_PROPERTYGRID, "Automation:setModelProperty");
std::string response = wxString::Format("{\"msg\":\"Set Model Property.\",\"worked\":\"%s\"}", JSONSafe(toStr(m != nullptr)));
return sendResponse(response, "", 200, true);
} else if (cmd == "getfseqdirectory") {
std::string json = wxString::Format("{\"folder\":\"%s\"}", JSONSafe(GetFseqDirectory()));
return sendResponse(json, "", 200, true);
} else if (cmd == "getFseqDirectory") {
return sendResponse(JSONSafe(GetFseqDirectory()), "folder", 200, false);
}
return false;
}
Expand Down

0 comments on commit a60f4d5

Please sign in to comment.