Skip to content

Commit

Permalink
optimize packet table entries, break loop when row didn't change
Browse files Browse the repository at this point in the history
  • Loading branch information
mverch67 committed Sep 18, 2024
1 parent 8047231 commit 7b74109
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion source/TFTView_320x240.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1831,7 +1831,14 @@ void TFTView_320x240::updateStatistics(const meshtastic_MeshPacket &p)
lv_table_set_cell_value(objects.statistics_table, row, 5, buf);
sprintf(buf, "%d", it2.sum);
lv_table_set_cell_value(objects.statistics_table, row, 6, buf);
move = true;

if (row != it2.row) {
it2.row = row;
move = true;
}
else {
break;
}
}
row++;
if (row > 11) // fill rows till bottom of 320x240 display
Expand Down

0 comments on commit 7b74109

Please sign in to comment.