——Ho tsoa ho Foramo ea Baetsi ba DWIN
Khatisong ena, re tla hlahisa nyeoe ea mohloli o bulehileng o hapileng likhau oa Seboka sa Batšehetsi ba DWIN - Sistimi ea Teko ea Teko ea Boitšisinyo ba Nako. Baenjiniere ba sebelisa skrine e bohlale ea 7-inch COF ho sebelisana le PAJ7620U2 sensor ea ho lemoha boitšisinyo ka mokokotlo oa T5L OS. Ha ho hlokahale ho sebelisa likonopo leha e le life. U hloka feela ho beha letsoho la hau haufi le sensor ho kenya skrineng sa taolo ea sistimi, 'me u hlokomele litlamorao tse 9 tsa boitšisinyo ba holimo, tlase, le letšehali, ka ho le letona, haufi, hole, ho potoloha ka ho le letšehali, ho potoloha ka ho le letona le wave.
1.UIMthepaDisplay
![asd (2)](https://ecdn6.globalso.com/upload/p/1355/source/2024-06/665f07846d9de96799.png)
![asd (1)](https://ecdn6.globalso.com/upload/p/1355/source/2024-06/665f07860ad7d49985.png)
2.C51 Moqapi oa Boenjiniere
Motheo oa T5L OS o sebelisana le PAJ7620U2 sensor ea ho lemoha boitšisinyo bakeng sa ho sebelisana ha data, e lemoha boitšisinyo ba hona joale, e khetholla setšoantšo se bontšitsoeng hona joale le setšoantšo se bontšitsoeng ka ho phetla leqephe, 'me se hlokomela mosebetsi oa ho fetola maqephe ka boitšisinyo. Referense khoutu e tjena:
void select_operate(uint16_t gesrure_value)
{
haeba(gesrure_value == GES_UP) //up
{
haeba(khetha_boleng>= 2)
{
khetha_boleng -= 2;
}
dgus_show_variate_icon_location_set(SELECT_DESCRIBE_RECTANGLE, select_pos[select_value][0], select_pos[select_value][1]);
}
ho seng joalo haeba(gesrure_value == GES_DOWN) //down
{
haeba(khetha_boleng
{
khetha_boleng += 2;
}
dgus_show_variate_icon_location_set(SELECT_DESCRIBE_RECTANGLE, select_pos[select_value][0], select_pos[select_value][1]);
}
ho seng joalo haeba(gesrure_value == GES_LEFT) //left
{
haeba(khetha_boleng % 2 == 1)
{
khetha_boleng -= 1;
}
dgus_show_variate_icon_location_set(SELECT_DESCRIBE_RECTANGLE, select_pos[select_value][0], select_pos[select_value][1]);
}
ho seng joalo haeba(gesrure_value == GES_RIGHT) //right
{
haeba(khetha_boleng % 2 == 0)
{
khetha_boleng += 1;
}
dgus_show_variate_icon_location_set(SELECT_DESCRIBE_RECTANGLE, select_pos[select_value][0], select_pos[select_value][1]);
}
}
void turning_operate(uint16_t gesrure_value)
{
uint16_t ke = 0;
uint8_t turning_mode = 0; //Mokhoa oa ho phethola leqephe, 0 holimo, 1 tlase, 2 leqele, 3 ka ho le letona
uint16_t turning_count = 0; //Nomoro ea ho qetela ea maqephe a phetoang
haeba(gesrure_value == GES_UP || gesrure_value == GES_DOWN || gesrure_value == GES_LEFT || gesrure_value == GES_RIGHT)
{
haeba(gesrure_value == GES_UP) //up
{
turning_mode = 0;
turning_count = 48;
}
ho seng joalo haeba(gesrure_value == GES_DOWN) //down
{
turning_mode = 1;
turning_count = 48;
}
ho seng joalo haeba(gesrure_value == GES_LEFT) //left
{
turning_mode = 2;
turning_count = 80;
}
ho seng joalo haeba(gesrure_value == GES_RIGHT) //right
{
turning_mode = 3;
turning_count = 80;
}
haeba(turning_current_image == 0 || turning_current_image == 2)
{
turning_current_image = 1;
}
tse ling
{
turning_current_image = 2;
}
bakeng sa(ke = 0;ke
{
switjha(turning_mode)
{
mohlala 0:
dgus_show_variate_icon_location_set(turning_current_image * 0x100 + 0x2000, 0, 480 - i * 10);
t5l0_sys_delay_ms(20);
haeba(turning_last_image != 0)
{
dgus_show_variate_icon_location_set(turning_last_image * 0x100 + 0x2000, 0, 0 - i * 10);
}
khefu;
ketsahalo 1:
dgus_show_variate_icon_location_set(turning_current_image * 0x100 + 0x2000, 0, -480 + i * 10);
t5l0_sys_delay_ms(20);
haeba(turning_last_image != 0)
{
dgus_show_variate_icon_location_set(turning_last_image * 0x100 + 0x2000, 0, 0 + i * 10);
}
khefu;
ketsahalo 2:
dgus_show_variate_icon_location_set(turning_current_image * 0x100 + 0x2000, 800 - i * 10, 0);
t5l0_sys_delay_ms(20);
haeba(turning_last_image != 0)
{
dgus_show_variate_icon_location_set(turning_last_image * 0x100 + 0x2000, 0 - i * 10, 0);
}
khefu;
ketsahalo 3:
dgus_show_variate_icon_location_set(turning_current_image * 0x100 + 0x2000, -800 + i * 10, 0);
t5l0_sys_delay_ms(20);
haeba(turning_last_image != 0)
{
dgus_show_variate_icon_location_set(turning_last_image * 0x100 + 0x2000, 0 + i * 10, 0);
}
khefu;
}
t5l0_sys_delay_ms(20);
}
turning_last_image = turning_current_image;
}
}
Nako ea poso: Mar-21-2024