——ຈາກ DWIN Developer Forum
ໃນບັນຫານີ້, ພວກເຮົາຈະແນະນໍາກໍລະນີເປີດແຫຼ່ງທີ່ໄດ້ຮັບຮາງວັນຂອງ DWIN Developer Forum – Interval Gesture Recognition Test System.ວິສະວະກອນໃຊ້ຫນ້າຈໍອັດສະລິຍະ COF 7 ນິ້ວເພື່ອໂຕ້ຕອບກັບເຊັນເຊີການຮັບຮູ້ທ່າທາງ PAJ7620U2 ຜ່ານຫຼັກ T5L OS.ບໍ່ຈໍາເປັນຕ້ອງໃຊ້ປຸ່ມໃດໆ.ທ່ານພຽງແຕ່ຕ້ອງເອົາມືໄປໃກ້ກັບເຊັນເຊີເພື່ອເຂົ້າໄປໃນໜ້າຈໍຄວບຄຸມລະບົບເມນູ, ແລະຮັບຮູ້ 9 ທ່າທາງຂຶ້ນ, ລົງ, ຊ້າຍ, ຂວາ, ປິດ, ໄກ, ໝຸນຊ້າຍ, ໝຸນຂວາ, ແລະຄື້ນ.
1.UIMຊັ້ນນອກDisplay
2.C51 ການອອກແບບວິສະວະກໍາ
ຫຼັກ T5L OS ພົວພັນກັບເຊັນເຊີຮັບຮູ້ທ່າທາງ PAJ7620U2 ສໍາລັບການໂຕ້ຕອບຂໍ້ມູນ, ກວດພົບທ່າທາງໃນປະຈຸບັນ, ກໍານົດຮູບພາບທີ່ສະແດງໃນປັດຈຸບັນແລະຮູບພາບທີ່ສະແດງໂດຍການຫັນຫນ້າ, ແລະຮັບຮູ້ຫນ້າທີ່ຂອງການປ່ຽນຫນ້າໂດຍໃຊ້ gestures.ລະຫັດອ້າງອີງແມ່ນດັ່ງຕໍ່ໄປນີ້:
void select_operate(uint16_t gesrure_value)
{
ຖ້າ (gesrure_value == GES_UP) // ຂຶ້ນ
{
ຖ້າ(select_value >= 2)
{
select_value -= 2;
}
dgus_show_variate_icon_location_set(SELECT_DESCRIBE_RECTANGLE, select_pos[select_value][0], select_pos[select_value][1]);
}
else if(gesrure_value == GES_DOWN) // ລົງ
{
ຖ້າ(select_value <= 1)
{
select_value += 2;
}
dgus_show_variate_icon_location_set(SELECT_DESCRIBE_RECTANGLE, select_pos[select_value][0], select_pos[select_value][1]);
}
else if(gesrure_value == GES_LEFT) // ຊ້າຍ
{
ຖ້າ(select_value %2 == 1)
{
select_value -= 1;
}
dgus_show_variate_icon_location_set(SELECT_DESCRIBE_RECTANGLE, select_pos[select_value][0], select_pos[select_value][1]);
}
else if(gesrure_value == GES_RIGHT) // ສິດ
{
ຖ້າ(select_value %2 == 0)
{
select_value += 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 i = 0;
uint8_t turning_mode = 0;//ຮູບແບບການຫັນໜ້າ, 0 ຂຶ້ນ, 1 ລົງ, 2 ຊ້າຍ, 3 ຂວາ
uint16_t turning_count = 0;//ຈຳນວນຄັ້ງສຸດທ້າຍຂອງໜ້າ
ຖ້າ(gesrure_value == GES_UP || gesrure_value == GES_DOWN || gesrure_value == GES_LEFT || gesrure_value == GES_RIGHT)
{
ຖ້າ (gesrure_value == GES_UP) // ຂຶ້ນ
{
turning_mode = 0;
turning_count = 48;
}
else if(gesrure_value == GES_DOWN) // ລົງ
{
turning_mode = 1;
turning_count = 48;
}
else if(gesrure_value == GES_LEFT) // ຊ້າຍ
{
turning_mode = 2;
turning_count = 80;
}
else if(gesrure_value == GES_RIGHT) // ສິດ
{
turning_mode = 3;
turning_count = 80;
}
if(turning_current_image == 0 || turning_current_image == 2)
{
turning_current_image = 1;
}
ອື່ນ
{
turning_current_image = 2;
}
ສໍາລັບ(i = 0;i <= turning_count;i++)
{
ສະຫຼັບ(turning_mode)
{
ກໍລະນີ 0:
dgus_show_variate_icon_location_set(turning_current_image * 0x100 + 0x2000, 0, 480 - i * 10);
t5l0_sys_delay_ms(20);
if(turning_last_image != 0)
{
dgus_show_variate_icon_location_set(turning_last_image * 0x100 + 0x2000, 0, 0 - i * 10);
}
ພັກຜ່ອນ;
ກໍລະນີ 1:
dgus_show_variate_icon_location_set(turning_current_image * 0x100 + 0x2000, 0, -480 + i * 10);
t5l0_sys_delay_ms(20);
if(turning_last_image != 0)
{
dgus_show_variate_icon_location_set(turning_last_image * 0x100 + 0x2000, 0, 0 + i * 10);
}
ພັກຜ່ອນ;
ກໍລະນີ 2:
dgus_show_variate_icon_location_set(turning_current_image * 0x100 + 0x2000, 800 - i * 10, 0);
t5l0_sys_delay_ms(20);
if(turning_last_image != 0)
{
dgus_show_variate_icon_location_set(turning_last_image * 0x100 + 0x2000, 0 - i * 10, 0);
}
ພັກຜ່ອນ;
ກໍລະນີ 3:
dgus_show_variate_icon_location_set(turning_current_image * 0x100 + 0x2000, -800 + i * 10, 0);
t5l0_sys_delay_ms(20);
if(turning_last_image != 0)
{
dgus_show_variate_icon_location_set(turning_last_image * 0x100 + 0x2000, 0 + i * 10, 0);
}
ພັກຜ່ອນ;
}
t5l0_sys_delay_ms(20);
}
turning_last_image = ຮູບພາບ turning_current_image;
}
}
ເວລາປະກາດ: 21-03-2024