DCC-EX / EX-T3-WiFi

ESP32 based WiFi throttle for DCC++
GNU General Public License v3.0
16 stars 4 forks source link

Issue with paging in loco list #96

Closed KevanBuilds closed 1 year ago

KevanBuilds commented 1 year ago

When the number of trains is a multiple of 8, not all locos are visible in the list. For example when there are a total of 16 locos defined, only 2 pages of 7 locos are created. Adding a 17th logo adds a 3rd page with 3 locos, thus 17 are visible.

The same issue happens with 24 locos. The same issue is also present in the groups list, when a multiple of 8 locos are added to a group.

KevanBuilds commented 1 year ago

Fixed it in my version by changing the 8 to 7 in divideAndCeil(count, 8); on line 60 of LocoByNameUI.cpp

alex-code commented 1 year ago

Good catch, thanks for reporting. Now fixed 👍