Browse Source

rfm69: clean-up *after* max ID, not before

fixes #2507
pull/2525/head
Maxim Prokhorov 1 year ago
parent
commit
ad8e30fcda
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      code/espurna/rfm69.cpp

+ 4
- 4
code/espurna/rfm69.cpp View File

@ -257,14 +257,14 @@ void _rfm69CleanNodes(size_t max) {
size_t id { 0 };
rfm69::settings::foreachMapping([&](rfm69::Mapping&&) {
if (id < max) {
return false;
++id;
return true;
}
++id;
return true;
return false;
});
while (id < rfm69::build::maxTopics()) {
while (id < max) {
delSetting({"rfm69Node", id});
delSetting({"rfm69Key", id});
delSetting({"rfm69Topic", id});


Loading…
Cancel
Save