Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
AzGilrock committed Feb 2, 2024
2 parents 1be3b8d + 1a67222 commit 024c444
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 11 deletions.
4 changes: 2 additions & 2 deletions ci_scripts/ci_post_xcodebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions xLights/controllers/ESPixelStick.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
27 changes: 22 additions & 5 deletions xLights/models/ArchesModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -316,6 +328,7 @@ void ArchesModel::InitModel()
}
SetArchCoord();
} else {
zigzag = (ModelXml->GetAttribute("ZigZag", "true") == "true");
int maxLen = 0;
int lcount = 0;
int sumNodes = 0;
Expand Down Expand Up @@ -377,7 +390,7 @@ void ArchesModel::InitModel()
}
}
y = y + 1;
dir = !dir;
if (zigzag) dir = !dir;
}
}

Expand Down Expand Up @@ -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("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<archesmodel \n");
Expand All @@ -585,6 +599,7 @@ void ArchesModel::ExportXlightsModel()
f.Write(wxString::Format("SourceVersion=\"%s\" ", v));
f.Write(wxString::Format("LayerSizes=\"%s\" ", ls));
f.Write(wxString::Format("Hollow=\"%s\" ", h));
f.Write(wxString::Format("ZigZag=\"%s\" ", zz));
f.Write(ExportSuperStringColors());
f.Write(" >\n");

Expand Down Expand Up @@ -629,6 +644,7 @@ 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", "true");

// Add any model version conversion logic here
// Source version will be the program version that created the custom model
Expand All @@ -652,6 +668,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);
Expand Down
1 change: 1 addition & 0 deletions xLights/models/ArchesModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,5 @@ class ArchesModel : public ModelWithScreenLocation<ThreePointScreenLocation>
int arc;
int _gap = 0;
int _hollow = 70;
bool zigzag = true;
};
2 changes: 0 additions & 2 deletions xLights/models/MatrixModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ class MatrixModel : public ModelWithScreenLocation<BoxedScreenLocation>
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; }
Expand Down
1 change: 0 additions & 1 deletion xLights/models/Model.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ class Model : public BaseObject

static const std::vector<std::string> 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; }
Expand Down
1 change: 0 additions & 1 deletion xLights/models/SpinnerModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class SpinnerModel : public ModelWithScreenLocation<BoxedScreenLocation>
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;
Expand Down

0 comments on commit 024c444

Please sign in to comment.