Skip to content

Commit 94a6052

Browse files
committed
Fix: I2C Scanner cursor movement.
1 parent e4bdfdf commit 94a6052

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
-52.6 KB
Binary file not shown.

LovyanLauncher/src/I2CScanner.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ class I2CScanner : public MenuCallBack
6666
if (idx >= ex.size()) idx = ex.size() - 1;
6767
}
6868
}
69-
_addr = ex[idx];
69+
if (idx < ex.size()) _addr = ex[idx];
7070

7171
return true;
7272
}
7373

7474
private:
75-
uint8_t _addr = 0xFF;
75+
uint8_t _addr = 0;
7676
};
7777

7878
#endif

0 commit comments

Comments
 (0)