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);
|
||||
}
|
||||
} 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());
|
||||
Window::getFullWindow()->clear();
|
||||
change_current_effect(effect);
|
||||
|
@ -11,15 +11,18 @@ namespace tests {
|
||||
int i=0;
|
||||
Effect* effect;
|
||||
int32_t diffs[3] = {0, 0, 0};
|
||||
String effect_name;
|
||||
while (1) {
|
||||
for (int j=0; j<3; j++) {
|
||||
int free_at_start = ESP.getFreeHeap();
|
||||
effect = select_effect(i);
|
||||
effect->loop(1);
|
||||
if (effect == NULL) return;
|
||||
effect_name = effect->get_name();
|
||||
delete effect;
|
||||
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++;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user