Fixes for recorder and tests.
This commit is contained in:
parent
54d357e6df
commit
97dd6de280
@ -36,7 +36,7 @@ Recorder::Recorder() {
|
|||||||
LOGln("Recorder * Sending data to port %d", _client_port);
|
LOGln("Recorder * Sending data to port %d", _client_port);
|
||||||
}
|
}
|
||||||
} else if (*(char*)data == 'E') {
|
} else if (*(char*)data == 'E') {
|
||||||
String effect = String(((char*)(data+1)));
|
String effect = String((char*)data+1);
|
||||||
LOGln("Recorder * Setting effect %s", effect.c_str());
|
LOGln("Recorder * Setting effect %s", effect.c_str());
|
||||||
Window::getFullWindow()->clear();
|
Window::getFullWindow()->clear();
|
||||||
change_current_effect(effect);
|
change_current_effect(effect);
|
||||||
|
@ -11,15 +11,18 @@ namespace tests {
|
|||||||
int i=0;
|
int i=0;
|
||||||
Effect* effect;
|
Effect* effect;
|
||||||
int32_t diffs[3] = {0, 0, 0};
|
int32_t diffs[3] = {0, 0, 0};
|
||||||
|
String effect_name;
|
||||||
while (1) {
|
while (1) {
|
||||||
for (int j=0; j<3; j++) {
|
for (int j=0; j<3; j++) {
|
||||||
int free_at_start = ESP.getFreeHeap();
|
int free_at_start = ESP.getFreeHeap();
|
||||||
effect = select_effect(i);
|
effect = select_effect(i);
|
||||||
|
effect->loop(1);
|
||||||
if (effect == NULL) return;
|
if (effect == NULL) return;
|
||||||
|
effect_name = effect->get_name();
|
||||||
delete effect;
|
delete effect;
|
||||||
diffs[i] = ESP.getFreeHeap() - free_at_start;
|
diffs[i] = ESP.getFreeHeap() - free_at_start;
|
||||||
}
|
}
|
||||||
LOGln("Tests * Memory leakage of effect #%d: %d, %d, %d", i, diffs[0], diffs[1], diffs[2]);
|
LOGln("Tests * Memory leakage of effect %s: %d, %d, %d", effect_name.c_str(), diffs[0], diffs[1], diffs[2]);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user