Skip to content
This repository was archived by the owner on Aug 22, 2024. It is now read-only.

Commit cff2f4f

Browse files
authored
Merge pull request #55 from n0xa/fix-up-arrow
Fix up arrow glitch, and make it roll over to end of menu too
2 parents c2f150d + 9344eb1 commit cff2f4f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

m5stick-nemo.ino

+3
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ void drawmenu(MENU thismenu[], int size) {
212212
DISP.fillScreen(BGCOLOR);
213213
DISP.setCursor(0, 5, 1);
214214
// scrolling menu
215+
if (cursor < 0) {
216+
cursor = size - 1; // rollover hack for up-arrow on cardputer
217+
}
215218
if (cursor > 5) {
216219
for ( int i = 0 + (cursor - 5) ; i < size ; i++ ) {
217220
DISP.print((cursor == i) ? ">" : " ");

0 commit comments

Comments
 (0)