From 980269291be7958639c6c708c143f5f5b4bf8aeb Mon Sep 17 00:00:00 2001 From: lewisxhe Date: Tue, 8 Sep 2026 11:03:10 +0800 Subject: [PATCH] Update factory --- examples/UnitTest/UnitTest.ino | 9 ++++++--- examples/UnitTest/utilities.h | 5 +++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/examples/UnitTest/UnitTest.ino b/examples/UnitTest/UnitTest.ino index efacc9f..e2a5a32 100644 --- a/examples/UnitTest/UnitTest.ino +++ b/examples/UnitTest/UnitTest.ino @@ -99,6 +99,9 @@ lv_indev_t *kb_indev = NULL; lv_indev_t *mouse_indev = NULL; lv_indev_t *touch_indev = NULL; uint32_t gps_start_ms = 0; +// Trackball sensitivity +// If the trackball is not sensitive enough or too sensitive, you can adjust this value. +const uint16_t trackball_sensitivity = 24; LV_IMG_DECLARE(image_emoji); @@ -1032,8 +1035,6 @@ void setup() lv_obj_set_scrollbar_mode(main_count, LV_SCROLLBAR_MODE_OFF); #endif - setupWiFi(); - bool foundGPS = false; foundGPS = setupGPS(); if (!foundGPS) { @@ -1065,6 +1066,8 @@ void setup() setupUI(); + setupWiFi(); + xTaskCreate(taskPlaySong, "play", 1024 * 4, NULL, 10, &playHandle); } @@ -1137,7 +1140,7 @@ static void mouse_read(lv_indev_drv_t *indev, lv_indev_data_t *data) BOARD_BOOT_PIN }; static bool last_dir[5]; - uint8_t pos = 10; + uint8_t pos = trackball_sensitivity; for (int i = 0; i < 5; i++) { bool dir = digitalRead(dir_pins[i]); if (dir != last_dir[i]) { diff --git a/examples/UnitTest/utilities.h b/examples/UnitTest/utilities.h index 1d1817d..c2e7ff5 100644 --- a/examples/UnitTest/utilities.h +++ b/examples/UnitTest/utilities.h @@ -79,9 +79,14 @@ #define RADIO_CR 6 #endif +#ifdef JAPAN_MIC +#define RADIO_TX_POWER 7 +#else #ifndef RADIO_TX_POWER #define RADIO_TX_POWER 22 #endif +#endif + #define DEFAULT_OPA 100