——Na DWIN Developer Forum
Ka taea te whakamahi i te keehi puna tuwhera whakawhiwhi tohu e te huinga DWIN i roto i te umanga hangahanga kia kitea nga ihirangi wahanga ciment - he taputapu ine-maha-maha i runga i te mata atamai T5L. Ka whakamahia e nga miihini te mata atamai T5L ki te whakahaere i te waahanga hiko hiko, te ine ine pāmahana, te waahanga whakamahana, te makuku makuku, me te whakauru i te waahanga hei mohio ki te mahi kitenga o te otinga totoka me te ihirangi sima wai, me te tautoko i te whakaaturanga o te reiti i te waa, tautuhinga pāmahana, rekoata hītori, Tautuhinga tawhā Stage me ētahi atu mahi.
1. Hanganga Papatono
![acdsb (1)](https://ecdn6.globalso.com/upload/p/1355/source/2024-03/65f96bb534d9587236.jpg)
2.UI Whakaatu Rawa
![acdsb (2)](https://ecdn6.globalso.com/upload/p/1355/source/2024-03/65f96bb6b626488123.jpg)
![acdsb (4)](https://ecdn6.globalso.com/upload/p/1355/source/2024-03/65f96bb84270f77694.jpg)
![acdsb (3)](https://ecdn6.globalso.com/upload/p/1355/source/2024-03/65f96bb975b6581165.jpg)
![acdsb (5)](https://ecdn6.globalso.com/upload/p/1355/source/2024-03/65f96bbaf20a513069.jpg)
3. Tauira Whanaketanga UI
![acdsb (6)](https://ecdn6.globalso.com/upload/p/1355/source/2024-03/65f96bbc7a0f429134.jpg)
4.C51 hoahoa rorohiko
Ko te kaupapa whakahau arataki mo te miihini ki te korero ki te poari whakahaere ma te whakamahi i te tauranga rangatū T5L 2 e whai ake nei:
kore te taupānga_init()
{
he_whakamatautau = 0;
wa_whakamatautau = 0;
is_sec = 0;
wā1 = 0;
ko_wa1 = 0;
uart2_init(115200);
send_bytes("AT+INIT=0\r\n",sizeof("AT+INIT=0\r\n")-1);
sys_delay_ms(2500);
sys_pic(1);
send_bytes("AT+START\r\n", sizeof("AT+START\r\n")-1);
}
Ko te kaupapa matua o te mata mohio T5L e taunekeneke ana me te poari whakahaere ki te mohio ki te mahi o te kitenga tito ciment e whai ake nei:
kore btn_click_handler()
{
#tautuhia BTN_VAL_ADDR 0x1000
u16 btn_val;
mena(kei te_whakamatautau&&he_hekona)
{
is_sec = 0;
wa_whakamatautau++;
btn_val = sprintf(commbuff,"%02u:%02u",(u16)(test_run_time/60),(u16)(test_run_time%60));
commbuff[btn_val+1] = 0;
sys_write_vp(TEST_TIME_VP,commbuff,5);
if(uart2rxsta&UART2_PACKET_OK)
{
if(uart2buf[0]==0x01&&uart2buf[1]==0x02)
{
init_weight = *(maanu*)(uart2buf+2);
init_weight *= (*(maanu*)flashdat);
sys_write_vp(0x1178, (u8*)&init_weight, 2);
} atu mena(uart2buf[0]==0x02&&uart2buf[1]==0x05)
{
init_ml = *(Foat*)(uart2buf+2);
init_ml /= (*(float*)flashdat+20);
sys_write_vp(0x1180, (u8*)&init_ml, 2);
} atu mena(uart2buf[0]==0x03&&uart2buf[1]==0x07)
{
tere_val = *(manu*)(uart2buf+2);
disp_val += (tere_val*2.45f);
sys_write_vp(0x1180, (u8*)&disp_val, 2);
} atu mena(uart2buf[0]==0x04)
{
tapeke_num = uart2buf[1]*256+uart2buf[2];
} atu mena(uart2buf[0]==0x05)
{
is_en_tmp = uart2buf[2];
}
uart2rxsta = 0;
}
}
mena(koe_wa1)
{
ko_wa1 = 0;
t_tauira();
mena(kei_whakamatautau&&ko_en_tmp)
sys_write_vp(0x1170,(u8*)&tmp,2);
}
if(is_btn_scan==0)
hoki mai;
is_btn_scan = 0;
sys_read_vp(BTN_VAL_ADDR,(u8*)&btn_val,1);
mena(btn_val==0)
hoki mai;
mena(btn_val
start_win_btn_click_handler(btn_val);
btn_val = 0;
sys_write_vp(BTN_VAL_ADDR,(u8*)&btn_val,1);
}
Tirohia te waehere puna mo etahi atu korero.
Wā tuku: Tihema-02-2023