Skip to content

Commit 72ff4ae

Browse files
authored
Merge pull request #7 from Forairaaaaa/main
add firmware version on boot screen
2 parents 24a9365 + ce49ce2 commit 72ff4ae

6 files changed

Lines changed: 69 additions & 35 deletions

File tree

main/apps/launcher/views/boot_anim/logo.h

Lines changed: 23 additions & 23 deletions
Large diffs are not rendered by default.

main/cardputer.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ extern "C" void app_main(void)
4444
spdlog::info("on hal test");
4545

4646
// HalCardputer::MicTest(&hal);
47-
HalCardputer::SpeakerTest(&hal);
47+
// HalCardputer::SpeakerTest(&hal);
48+
49+
HalCardputer::LcdBgLightTest(&hal);
4850
// ------------------------------------------------------------------ //
4951

5052

main/hal/display/hal_display.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ class LGFX_Cardputer : public lgfx::LGFX_Device {
7171
cfg.invert = false; // バックライトの輝度を反転させる場合 true
7272
// cfg.freq = 44100; // バックライトのPWM周波数
7373
cfg.freq = 200; // バックライトのPWM周波数
74+
// cfg.freq = 500; // バックライトのPWM周波数
7475
cfg.pwm_channel = 7; // 使用するPWMのチャンネル番号
7576

7677
_light_instance.config(cfg);

main/hal/hal_cardputer.cpp

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,4 +197,34 @@ void HalCardputer::SpeakerTest(HalCardputer* hal)
197197
delay(1000);
198198

199199
}
200+
201+
}
202+
203+
204+
void HalCardputer::LcdBgLightTest(HalCardputer* hal)
205+
{
206+
hal->display()->setTextSize(3);
207+
208+
std::vector<int> color_list = {TFT_RED, TFT_GREEN, TFT_BLUE};
209+
for (auto i : color_list)
210+
{
211+
hal->display()->fillScreen(i);
212+
213+
for (int i = 0; i < 256; i++)
214+
{
215+
hal->display()->setCursor(0, 0);
216+
hal->display()->printf("%d", i);
217+
hal->display()->setBrightness(i);
218+
delay(20);
219+
}
220+
delay(1000);
221+
222+
for (int i = 255; i >= 0; i--)
223+
{
224+
hal->display()->setCursor(0, 0);
225+
hal->display()->printf("%d", i);
226+
hal->display()->setBrightness(i);
227+
delay(20);
228+
}
229+
}
200230
}

main/hal/hal_cardputer.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,6 @@ namespace HAL
3333
public:
3434
static void MicTest(HalCardputer* hal);
3535
static void SpeakerTest(HalCardputer* hal);
36+
static void LcdBgLightTest(HalCardputer* hal);
3637
};
3738
}

sdkconfig

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,17 +1279,6 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
12791279
# CONFIG_WPA_DPP_SUPPORT is not set
12801280
# end of Supplicant
12811281

1282-
#
1283-
# CMake Utilities
1284-
#
1285-
# CONFIG_CU_RELINKER_ENABLE is not set
1286-
# CONFIG_CU_DIAGNOSTICS_COLOR_NEVER is not set
1287-
CONFIG_CU_DIAGNOSTICS_COLOR_ALWAYS=y
1288-
# CONFIG_CU_DIAGNOSTICS_COLOR_AUTO is not set
1289-
# CONFIG_CU_GCC_LTO_ENABLE is not set
1290-
# CONFIG_CU_GCC_STRING_1BYTE_ALIGN is not set
1291-
# end of CMake Utilities
1292-
12931282
#
12941283
# ESP-NOW Configuration
12951284
#
@@ -1356,6 +1345,17 @@ CONFIG_ESPNOW_DEBUG_CONSOLE_UART_NUM_0=y
13561345
CONFIG_ESPNOW_DEBUG_CONSOLE_UART_NUM=0
13571346
# end of ESP-NOW Debug Configuration
13581347
# end of ESP-NOW Configuration
1348+
1349+
#
1350+
# CMake Utilities
1351+
#
1352+
# CONFIG_CU_RELINKER_ENABLE is not set
1353+
# CONFIG_CU_DIAGNOSTICS_COLOR_NEVER is not set
1354+
CONFIG_CU_DIAGNOSTICS_COLOR_ALWAYS=y
1355+
# CONFIG_CU_DIAGNOSTICS_COLOR_AUTO is not set
1356+
# CONFIG_CU_GCC_LTO_ENABLE is not set
1357+
# CONFIG_CU_GCC_STRING_1BYTE_ALIGN is not set
1358+
# end of CMake Utilities
13591359
# end of Component config
13601360

13611361
#

0 commit comments

Comments
 (0)