From 65bdb8b349a255a373ff31a98f88b686cb939b1c Mon Sep 17 00:00:00 2001 From: Scott Hanson Date: Thu, 1 Feb 2024 22:51:48 -0500 Subject: [PATCH 1/4] return early to prevent crash --- xLights/controllers/ESPixelStick.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xLights/controllers/ESPixelStick.cpp b/xLights/controllers/ESPixelStick.cpp index d8c6a53636..a10eadf2a9 100644 --- a/xLights/controllers/ESPixelStick.cpp +++ b/xLights/controllers/ESPixelStick.cpp @@ -644,6 +644,10 @@ bool ESPixelStick::SetOutputsV3(ModelManager* allmodels, OutputManager* outputMa _wsClient.Send("G1"); std::string config = GetWSResponse(); + if (config.empty()) { + DisplayError("Failed to get Data from ESPixelStick"); + return false; + } config = config.substr(2); wxJSONValue origJson; From f9b2d59213b3f12a45ed1d26b038a62a85fa47c9 Mon Sep 17 00:00:00 2001 From: Daniel Kulp Date: Fri, 2 Feb 2024 09:23:27 -0500 Subject: [PATCH 2/4] More work on test log --- ci_scripts/ci_post_xcodebuild.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci_scripts/ci_post_xcodebuild.sh b/ci_scripts/ci_post_xcodebuild.sh index 360645116a..63228ca15e 100755 --- a/ci_scripts/ci_post_xcodebuild.sh +++ b/ci_scripts/ci_post_xcodebuild.sh @@ -3,6 +3,6 @@ if [[ -d "$CI_APP_STORE_SIGNED_APP_PATH" ]]; then TESTFLIGHT_DIR_PATH=../TestFlight mkdir $TESTFLIGHT_DIR_PATH - git log --since="28 hours ago" --pretty=format:"%s" | tee $TESTFLIGHT_DIR_PATH/WhatToTest.en-US.txt - # git status | head -n 1 >> $TESTFLIGHT_DIR_PATH/WhatToTest.en-US.txt + git status | head -n 1 | tee $TESTFLIGHT_DIR_PATH/WhatToTest.en-US.txt + git log --since="48 hours ago" --pretty=format:"%s" | tee -a $TESTFLIGHT_DIR_PATH/WhatToTest.en-US.txt fi From 2ad4a2323f7ae0846a50111c1b6edbe48c6d8756 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 31 Jan 2024 20:17:29 -0500 Subject: [PATCH 3/4] Option for arch wiring to not zigzag --- xLights/models/ArchesModel.cpp | 33 ++++++++++++++++++++++++++++----- xLights/models/ArchesModel.h | 2 ++ 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/xLights/models/ArchesModel.cpp b/xLights/models/ArchesModel.cpp index c1ca15f5d9..c68e523f1c 100644 --- a/xLights/models/ArchesModel.cpp +++ b/xLights/models/ArchesModel.cpp @@ -77,6 +77,9 @@ void ArchesModel::AddTypeProperties(wxPropertyGridInterface* grid, OutputManager p->SetAttribute("Min", 0); p->SetAttribute("Max", 95); p->SetEditor("SpinCtrl"); + + p = grid->Append(new wxBoolProperty("Zig-Zag Layers", "ZigZag", zigzag)); + p->SetEditor("CheckBox"); } p = grid->Append(new wxUIntProperty("Lights Per Node", "ArchesLights", parm3)); @@ -184,15 +187,24 @@ int ArchesModel::OnPropertyGridChange(wxPropertyGridInterface* grid, wxPropertyG AddASAPWork(OutputModelManager::WORK_REDRAW_LAYOUTPREVIEW, "ArchesModel::HandleLayerSizePropertyChange::LayeredArches"); AddASAPWork(OutputModelManager::WORK_RELOAD_PROPERTYGRID, "ArchesModel::HandleLayerSizePropertyChange::LayeredArches"); return 0; + } else if ("ZigZag" == event.GetPropertyName()) { + zigzag = event.GetPropertyValue().GetBool(); + ModelXml->DeleteAttribute("ZigZag"); + ModelXml->AddAttribute("ZigZag", event.GetPropertyValue().GetBool() ? "true" : "false"); + AddASAPWork(OutputModelManager::WORK_RGBEFFECTS_CHANGE, "ArchesModel::OnPropertyGridChange::ArchesZigZag"); + AddASAPWork(OutputModelManager::WORK_MODELS_CHANGE_REQUIRING_RERENDER, "ArchesModel::OnPropertyGridChange::ArchesZigZag"); + AddASAPWork(OutputModelManager::WORK_RELOAD_MODEL_FROM_XML, "ArchesModel::OnPropertyGridChange::ArchesZigZag"); + AddASAPWork(OutputModelManager::WORK_REDRAW_LAYOUTPREVIEW, "ArchesModel::OnPropertyGridChange::ArchesZigZag"); + return 0; } else if ("Hollow" == event.GetPropertyName()) { _hollow = event.GetPropertyValue().GetLong(); ModelXml->DeleteAttribute("Hollow"); ModelXml->AddAttribute("Hollow", wxString::Format("%d", (int)event.GetPropertyValue().GetLong())); IncrementChangeCount(); - AddASAPWork(OutputModelManager::WORK_RGBEFFECTS_CHANGE, "ArchesModel::OnPropertyGridChange::ArchesGap"); - AddASAPWork(OutputModelManager::WORK_MODELS_CHANGE_REQUIRING_RERENDER, "ArchesModel::OnPropertyGridChange::ArchesGap"); - AddASAPWork(OutputModelManager::WORK_RELOAD_MODEL_FROM_XML, "ArchesModel::OnPropertyGridChange::ArchesGap"); - AddASAPWork(OutputModelManager::WORK_REDRAW_LAYOUTPREVIEW, "ArchesModel::OnPropertyGridChange::ArchesGap"); + AddASAPWork(OutputModelManager::WORK_RGBEFFECTS_CHANGE, "ArchesModel::OnPropertyGridChange::ArchesHollow"); + AddASAPWork(OutputModelManager::WORK_MODELS_CHANGE_REQUIRING_RERENDER, "ArchesModel::OnPropertyGridChange::ArchesHollow"); + AddASAPWork(OutputModelManager::WORK_RELOAD_MODEL_FROM_XML, "ArchesModel::OnPropertyGridChange::ArchesHollow"); + AddASAPWork(OutputModelManager::WORK_REDRAW_LAYOUTPREVIEW, "ArchesModel::OnPropertyGridChange::ArchesHollow"); return 0; } else if ("ArchesGap" == event.GetPropertyName()) { _gap = event.GetPropertyValue().GetLong(); @@ -316,6 +328,7 @@ void ArchesModel::InitModel() } SetArchCoord(); } else { + zigzag = (ModelXml->GetAttribute("ZigZag", "true") == "true"); int maxLen = 0; int lcount = 0; int sumNodes = 0; @@ -377,7 +390,7 @@ void ArchesModel::InitModel() } } y = y + 1; - dir = !dir; + if (zigzag) dir = !dir; } } @@ -564,6 +577,7 @@ void ArchesModel::ExportXlightsModel() wxString an = ModelXml->GetAttribute("Angle", "0"); wxString ls = ModelXml->GetAttribute("LayerSizes", ""); wxString h = ModelXml->GetAttribute("Hollow", "70"); + wxString zz = ModelXml->GetAttribute("ZigZag", "true"); wxString v = xlights_version_string; f.Write("\n\n"); @@ -629,8 +644,15 @@ void ArchesModel::ImportXlightsModel(wxXmlNode* root, xLightsFrame* xlights, flo wxString psp = root->GetAttribute("PixelSpacing"); wxString ls = root->GetAttribute("LayerSizes"); wxString h = root->GetAttribute("Hollow"); + wxString zz = root->GetAttribute("ZigZag"); // Add any model version conversion logic here + + if (zz == "") + { + zz = "true"; + } + // Source version will be the program version that created the custom model SetProperty("parm1", p1); @@ -652,6 +674,7 @@ void ArchesModel::ImportXlightsModel(wxXmlNode* root, xLightsFrame* xlights, flo SetProperty("PixelSpacing", psp); SetProperty("LayerSizes", ls); SetProperty("Hollow", h); + SetProperty("ZigZag", zz); wxString newname = xlights->AllModels.GenerateModelName(name.ToStdString()); GetModelScreenLocation().Write(ModelXml); diff --git a/xLights/models/ArchesModel.h b/xLights/models/ArchesModel.h index 4b3aa50548..fe32300822 100644 --- a/xLights/models/ArchesModel.h +++ b/xLights/models/ArchesModel.h @@ -23,6 +23,7 @@ class ArchesModel : public ModelWithScreenLocation virtual void InitRenderBufferNodes(const std::string &type, const std::string &camera, const std::string &transform, std::vector &Nodes, int &BufferWi, int &BufferHi, int stagger, bool deep = false) const override; virtual int GetNumPhysicalStrings() const override { return 1; } + virtual bool StrandsZigZagOnString() const override { return zigzag; } virtual int GetLightsPerNode() const override { return parm3; } // default to one unless a model supports this virtual void AddTypeProperties(wxPropertyGridInterface* grid, OutputManager* outputManager) override; @@ -53,4 +54,5 @@ class ArchesModel : public ModelWithScreenLocation int arc; int _gap = 0; int _hollow = 70; + bool zigzag = true; }; From 1a67222edfd53a11eb35742f029a106da41d02f1 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 1 Feb 2024 08:34:27 -0500 Subject: [PATCH 4/4] Code cleanups - simplify / remove unused --- xLights/models/ArchesModel.cpp | 8 +------- xLights/models/ArchesModel.h | 1 - xLights/models/MatrixModel.h | 2 -- xLights/models/Model.h | 1 - xLights/models/SpinnerModel.h | 1 - 5 files changed, 1 insertion(+), 12 deletions(-) diff --git a/xLights/models/ArchesModel.cpp b/xLights/models/ArchesModel.cpp index c68e523f1c..aef0e5172f 100644 --- a/xLights/models/ArchesModel.cpp +++ b/xLights/models/ArchesModel.cpp @@ -644,15 +644,9 @@ void ArchesModel::ImportXlightsModel(wxXmlNode* root, xLightsFrame* xlights, flo wxString psp = root->GetAttribute("PixelSpacing"); wxString ls = root->GetAttribute("LayerSizes"); wxString h = root->GetAttribute("Hollow"); - wxString zz = root->GetAttribute("ZigZag"); + wxString zz = root->GetAttribute("ZigZag", "true"); // Add any model version conversion logic here - - if (zz == "") - { - zz = "true"; - } - // Source version will be the program version that created the custom model SetProperty("parm1", p1); diff --git a/xLights/models/ArchesModel.h b/xLights/models/ArchesModel.h index fe32300822..7321a57736 100644 --- a/xLights/models/ArchesModel.h +++ b/xLights/models/ArchesModel.h @@ -23,7 +23,6 @@ class ArchesModel : public ModelWithScreenLocation virtual void InitRenderBufferNodes(const std::string &type, const std::string &camera, const std::string &transform, std::vector &Nodes, int &BufferWi, int &BufferHi, int stagger, bool deep = false) const override; virtual int GetNumPhysicalStrings() const override { return 1; } - virtual bool StrandsZigZagOnString() const override { return zigzag; } virtual int GetLightsPerNode() const override { return parm3; } // default to one unless a model supports this virtual void AddTypeProperties(wxPropertyGridInterface* grid, OutputManager* outputManager) override; diff --git a/xLights/models/MatrixModel.h b/xLights/models/MatrixModel.h index 37d7f91dd4..db66c7c303 100644 --- a/xLights/models/MatrixModel.h +++ b/xLights/models/MatrixModel.h @@ -19,8 +19,6 @@ class MatrixModel : public ModelWithScreenLocation virtual ~MatrixModel(); virtual int GetNumStrands() const override; - virtual bool StrandsZigZagOnString() const override { return true; } - bool SupportsChangingStringCount() const override{ return true; }; bool ChangeStringCount(long count, std::string& message) override; virtual bool SupportsXlightsModel() override { return true; } diff --git a/xLights/models/Model.h b/xLights/models/Model.h index d3b47eb017..146b1459d2 100644 --- a/xLights/models/Model.h +++ b/xLights/models/Model.h @@ -199,7 +199,6 @@ class Model : public BaseObject static const std::vector DEFAULT_BUFFER_STYLES; - virtual bool StrandsZigZagOnString() const { return false; }; int GetDefaultBufferWi() const { return BufferWi; } int GetDefaultBufferHt() const { return BufferHt; } virtual bool IsDMXModel() const { return false; } diff --git a/xLights/models/SpinnerModel.h b/xLights/models/SpinnerModel.h index 78c88430bf..f27b041913 100644 --- a/xLights/models/SpinnerModel.h +++ b/xLights/models/SpinnerModel.h @@ -19,7 +19,6 @@ class SpinnerModel : public ModelWithScreenLocation virtual ~SpinnerModel(); virtual int GetNumStrands() const override; - virtual bool StrandsZigZagOnString() const override { return true;}; virtual int NodesPerString() const override; virtual void AddTypeProperties(wxPropertyGridInterface* grid, OutputManager* outputManager) override;