mirror of
https://github.com/No-Chicken/Power-Pico.git
synced 2026-04-03 13:02:36 +08:00
更新注释
This commit is contained in:
@@ -29,10 +29,12 @@ static uint8_t timecount = 0;
|
|||||||
#include "key.h"
|
#include "key.h"
|
||||||
void ui_main_page_key_handler(void* key_event)
|
void ui_main_page_key_handler(void* key_event)
|
||||||
{
|
{
|
||||||
if(((key_event_t*)key_event)->id == KEY_ID_B) {
|
if(((key_event_t*)key_event)->id == KEY_ID_B && ((key_event_t*)key_event)->type == KEY_EVT_CLICK)
|
||||||
|
{
|
||||||
lv_lib_pm_next();
|
lv_lib_pm_next();
|
||||||
} else if (((key_event_t*)key_event)->id == KEY_ID_L &&
|
}
|
||||||
((key_event_t*)key_event)->type == KEY_EVT_CLICK) {
|
else if (((key_event_t*)key_event)->id == KEY_ID_L && ((key_event_t*)key_event)->type == KEY_EVT_CLICK)
|
||||||
|
{
|
||||||
// rotation - 90 degrees
|
// rotation - 90 degrees
|
||||||
// rotation – LV_DISPLAY_ROTATION_0/90/180/270
|
// rotation – LV_DISPLAY_ROTATION_0/90/180/270
|
||||||
uint16_t rotation = ui_get_display_rotation();
|
uint16_t rotation = ui_get_display_rotation();
|
||||||
@@ -42,8 +44,9 @@ void ui_main_page_key_handler(void* key_event)
|
|||||||
// save settings to eeprom
|
// save settings to eeprom
|
||||||
ui_system_settings_save();
|
ui_system_settings_save();
|
||||||
ui_full_screen_refresh(ui_HomeScreen);
|
ui_full_screen_refresh(ui_HomeScreen);
|
||||||
} else if (((key_event_t*)key_event)->id == KEY_ID_R &&
|
}
|
||||||
((key_event_t*)key_event)->type == KEY_EVT_CLICK) {
|
else if (((key_event_t*)key_event)->id == KEY_ID_R && ((key_event_t*)key_event)->type == KEY_EVT_CLICK)
|
||||||
|
{
|
||||||
// rotation + 90 degrees
|
// rotation + 90 degrees
|
||||||
uint16_t rotation = ui_get_display_rotation();
|
uint16_t rotation = ui_get_display_rotation();
|
||||||
rotation = (rotation + 360 + 90) % 360;
|
rotation = (rotation + 360 + 90) % 360;
|
||||||
|
|||||||
Reference in New Issue
Block a user