Skip to content

Commit a52df9e

Browse files
committed
Rewording and fix down event type bug
1 parent 02305cb commit a52df9e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

i2ctools.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,9 @@ int32_t i2ctools_app(void* p) {
146146
}
147147
}
148148
// Long Down
149-
else if(event.key == InputKeyDown && event.type == InputTypeLong) {
149+
else if(
150+
event.key == InputKeyDown &&
151+
(event.type == InputTypeLong || event.type == InputTypeRepeat)) {
150152
if(i2ctools->main_view->current_view == SEND_VIEW) {
151153
if(i2ctools->sender->value > 0x05) {
152154
i2ctools->sender->value -= 5;

views/scanner_view.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ void draw_scanner_view(Canvas* canvas, i2cScanner* i2c_scanner) {
66
canvas_draw_rframe(canvas, 0, 0, 128, 64, 3);
77

88
char count_text[46];
9-
char count_text_fmt[] = "Found: %d";
9+
char count_text_fmt[] = "Peripherals Found: %d";
1010
canvas_set_font(canvas, FontSecondary);
1111
snprintf(count_text, sizeof(count_text), count_text_fmt, (int)i2c_scanner->nb_found);
12-
canvas_draw_str_aligned(canvas, 50, 3, AlignLeft, AlignTop, count_text);
12+
canvas_draw_str_aligned(canvas, 3, 3, AlignLeft, AlignTop, count_text);
1313
uint8_t x_pos = 0;
1414
uint8_t y_pos = 0;
1515
uint8_t idx_to_print = 0;
@@ -20,7 +20,7 @@ void draw_scanner_view(Canvas* canvas, i2cScanner* i2c_scanner) {
2020
}
2121
snprintf(
2222
count_text, sizeof(count_text), "0x%02x ", (int)i2c_scanner->addresses[idx_to_print]);
23-
const uint8_t x_start = 13;
23+
const uint8_t x_start = 3;
2424
if(i < 4) {
2525
x_pos = x_start + (i * 26);
2626
y_pos = 15;

0 commit comments

Comments
 (0)