summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoy Cho <joy.cho@hardkernel.com>2021-01-08 07:25:30 +0300
committerJoy Cho <joy.cho@hardkernel.com>2021-01-08 07:42:10 +0300
commite9d7bedabe68cec4d5924ee11de510399577ece2 (patch)
tree0d67df02bf48755aab1f80aa5e830a39387a6034
parent4038ab6d6840e56177405c14129a1f19d21e7f10 (diff)
downloadu-boot-e9d7bedabe68cec4d5924ee11de510399577ece2.tar.xz
odroidtest: Fix abnormal key draw condition
default initialized key_idx = -1 Change-Id: Ia51e82b99d61465af28361762aac45f83a5c312f
-rw-r--r--cmd/odroidtest.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/odroidtest.c b/cmd/odroidtest.c
index fb9b99af89..6b54a1d57b 100644
--- a/cmd/odroidtest.c
+++ b/cmd/odroidtest.c
@@ -177,7 +177,7 @@ void adc_draw_key_arrays(struct key_adc *adcs, int key_idx)
}
mdelay(200);
- if (key_idx > 0) {
+ if (key_idx > -1) {
lcd_setfg_color("green");
lcd_printf(adckeys[key_idx].x, adckeys[key_idx].y,
0, adckeys[key_idx].name);
@@ -696,7 +696,7 @@ void btn_draw_key_arrays(int numkeys, int key_idx)
mdelay(200);
- if (key_idx > 0) {
+ if (key_idx > -1) {
lcd_setfg_color("green");
lcd_printf(gpiokeys[key_idx].x, gpiokeys[key_idx].y,
0, gpiokeys[key_idx].name);