Commit c303e1bf841184b335adc940c2d7567cd006eec4
1 parent
9c26fb1d
V100.0.13
1、增加停止信标设置,如即时反馈功能,语言设置功能等等; 2、增加清除EEPROM函数,用于测试初始默认设置,正常固件需要注释; 3、按要求修改默认设置,如默认登录密码1024,默认基站名称可见,默认登录采电显示允许,默认在线关机2分钟; 4、扩展信标键盘进入慢的问题改回V100.0.7版本,逻辑分析仪调试正常,(有点奇怪,500的超时数据放到函数内部不行,放到函数外就可以?);
Showing
2 changed files
with
91 additions
and
0 deletions
Base_core/core_lib/stop_beacon_intf.h
0 → 100644
Base_core/core_src/stop_beacon.c
0 → 100644
1 | +//#include "core_extern.h" | ||
2 | +//#include "base_pc_protocol.h" | ||
3 | +//#include "platform_extern.h" | ||
4 | +//#include "func_extern.h" | ||
5 | +#include "base_core.h" | ||
6 | +#include "string.h" | ||
7 | +#include "stop_beacon_intf.h" | ||
8 | + | ||
9 | +#if MD_SPECIAL_STOP_PRO | ||
10 | + | ||
11 | +#define RSP_LEN 2 | ||
12 | +#define LANG_LEN 1 | ||
13 | +unsigned char rsp_para[RSP_LEN],lang[LANG_LEN]; | ||
14 | + | ||
15 | +// | ||
16 | +void stop_beacon__rxpc(const unsigned char *rxpc) | ||
17 | +{ | ||
18 | + //rxpc[3] = 11 | ||
19 | + //rxpc[4] = 30 31 32 33 | ||
20 | + unsigned char ack_buf[8]; | ||
21 | + switch(rxpc[4]){ | ||
22 | + case 31: | ||
23 | + memcpy( rsp_para,rxpc+5,RSP_LEN); | ||
24 | + base_write_e2prom(STORE_BASE_STOP_BEACON,rsp_para,RSP_LEN);//func__store_intf.write_with_flag(STORE_BASE_STOP_BEACON,rsp_para,RSP_LEN); | ||
25 | + case 30: | ||
26 | +// my_debug.print_buf(1,"stop beacon data rsp:",rsp_para,RSP_LEN); | ||
27 | + ack_buf[0] =rxpc[4]; | ||
28 | + memcpy(ack_buf+1,rsp_para,RSP_LEN); | ||
29 | + pc_cmd_0x61_ack(11,ack_buf,RSP_LEN+1);//core__pc_intf.ack_pc(0xe1,11,ack_buf,RSP_LEN+1); | ||
30 | + break; | ||
31 | + | ||
32 | + case 33: | ||
33 | + memcpy( lang,rxpc+5,LANG_LEN); | ||
34 | + base_write_e2prom(STORE_BASE_STOP_BEACON2,lang,LANG_LEN);//func__store_intf.write_with_flag(STORE_BASE_STOP_BEACON2,lang,LANG_LEN); | ||
35 | + case 32: | ||
36 | +// my_debug.print_buf(1,"stop beacon data lang:",lang,LANG_LEN); | ||
37 | + ack_buf[0] =rxpc[4]; | ||
38 | + memcpy(ack_buf+1,lang,LANG_LEN); | ||
39 | + pc_cmd_0x61_ack(11,ack_buf,LANG_LEN+1);//core__pc_intf.ack_pc(0xe1,11,ack_buf,LANG_LEN+1); | ||
40 | + break; | ||
41 | + | ||
42 | + default:break; | ||
43 | + } //sw | ||
44 | +} | ||
45 | + | ||
46 | + | ||
47 | +void stop_beacon__cover(unsigned char *tmp) | ||
48 | +{ | ||
49 | + memcpy(tmp,rsp_para,RSP_LEN); //byte 10 | ||
50 | + memcpy(tmp+2,lang,LANG_LEN); //byte 14 | ||
51 | +} | ||
52 | + | ||
53 | + | ||
54 | + | ||
55 | +void stop_beacon__powerup(void) | ||
56 | +{ | ||
57 | + unsigned char tmp[2+1]; | ||
58 | + if( base_read_e2prom(STORE_BASE_STOP_BEACON,tmp,RSP_LEN) ){//if( func__store_intf.read_with_flag(STORE_BASE_STOP_BEACON,tmp,RSP_LEN) ){ | ||
59 | + memcpy( rsp_para,tmp,RSP_LEN); | ||
60 | + } | ||
61 | + | ||
62 | + if( base_read_e2prom(STORE_BASE_STOP_BEACON2,tmp,LANG_LEN) ){//if( func__store_intf.read_with_flag(STORE_BASE_STOP_BEACON2,tmp,LANG_LEN) ){ | ||
63 | + memcpy( lang,tmp,LANG_LEN); | ||
64 | + } | ||
65 | + | ||
66 | +} | ||
67 | + | ||
68 | + | ||
69 | + | ||
70 | +struct stop_beacon_intf_STR core__stop_beacon_intf={ | ||
71 | + .rxpc = stop_beacon__rxpc, | ||
72 | + .cover = stop_beacon__cover, | ||
73 | + .pwrup = stop_beacon__powerup, | ||
74 | +}; | ||
75 | + | ||
76 | + | ||
77 | +#endif | ||
78 | + | ||
79 | + |