intialize pattern addresses with default, else they are created with value 0 and overwrite the default in server (#628)

This commit is contained in:
Dhanya Thattil 2023-01-23 10:59:18 +01:00 committed by GitHub
parent 946e6aa817
commit c5b621b684
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,7 +9,15 @@
namespace sls {
Pattern::Pattern() = default;
Pattern::Pattern() {
// initialize pattern addresses
for (int i = 0; i != MAX_PATTERN_LEVELS; ++i) {
pat->startloop[i] = MAX_PATTERN_LENGTH - 1;
pat->stoploop[i] = MAX_PATTERN_LENGTH - 1;
pat->wait[i] = MAX_PATTERN_LENGTH - 1;
}
}
Pattern::~Pattern() { delete pat; }
Pattern::Pattern(const Pattern &other) {