血压
authorp15692025051 <846603105@qq.com>
Sun, 7 Apr 2024 08:52:28 +0000 (16:52 +0800)
committerp15692025051 <846603105@qq.com>
Sun, 7 Apr 2024 08:52:28 +0000 (16:52 +0800)
15 files changed:
1.doc/K18/BLE_Watch/code/sensor_drive.c
1.doc/K18/BLE_Watch/code/sensor_drive.h
1.doc/K18/BLE_Watch/components/driver/driver_timer.c
1.doc/K18/BLE_Watch/keil/BLE_Watch.uvgui.Administrator
1.doc/K18/BLE_Watch/keil/BLE_Watch.uvopt
1.doc/K18/BLE_Watch/keil/BLE_Watch.uvproj
1.doc/K18/BLE_Watch/keil/Imitate_IIC.c
1.doc/K18/BLE_Watch/keil/SL_Watch_Pedo_Kcal_Wrist_Sleep_Sway_L_Algorithm.h
1.doc/K18/BLE_Watch/keil/SL_Watch_Pedo_Kcal_Wrist_Sleep_Sway_L_Application.c
1.doc/K18/BLE_Watch/keil/VC9202/vc9202_common.h
1.doc/K18/BLE_Watch/keil/VC9202/vc9202_driver.c
1.doc/K18/BLE_Watch/keil/VC9202/vc9202_user.c
1.doc/K18/BLE_Watch/keil/VC9202/vc9202_user.h
1.doc/K18/BLE_Watch/keil/feedback.txt
1.doc/K18/BLE_Watch/keil/uart.c

index 0ffd582..4b5210e 100644 (file)
@@ -231,20 +231,29 @@ void gsensor_init(void)
 }
  /////////////////////////////////////数据转换//////////////////////////////////
 //////////////////////////////////////十六进制转字符串ASCII码///////////////////////////////////////////////////////////////////////
-char str_high=0,str_low=0;//uint8转字符高位和低位
-void uintTOstr(uint8_t hex_data)//十六进制转字符串ASCII码
-{
-       str_high =(hex_data&0xF0)>>4;//取高位的4位
-       str_low =(hex_data&0x0F);//取低位的4位
-       if(str_high>=0&&str_high<=9)//0-9
-               str_high=str_high+48;
-       else if(str_high>=0x0A&&str_high<=0x0F)//A-F
-               str_high=str_high+55;
-       if(str_low>=0&&str_low<=9)//0-9
-               str_low=str_low+48;
-       else if(str_low>=0x0A&&str_low<=0x0F)//A-F
-               str_low=str_low+55;
-}
+// char str_high=0,str_low=0;//uint8转字符高位和低位
+// void uintTOstr(char hex_data)//十六进制转字符串ASCII码
+// {
+//     str_high =(hex_data&0xF0)>>4;//取高位的4位
+//     str_low =(hex_data&0x0F);//取低位的4位
+//     if(str_high>=0)//0-9
+//     {
+//             if(str_high<=9)
+//                     str_high=str_high+48;
+//     }
+//     else if(str_high>=0x0A&&str_high<=0x0F)//A-F
+//             str_high=str_high+55;
+//     if(str_low>=0)//0-9
+//     {
+//             if(str_low<=9)
+//             {
+//                     str_low=str_low+48;
+//             }
+//     }
+               
+//     else if(str_low>=0x0A&&str_low<=0x0F)//A-F
+//             str_low=str_low+55;
+// }
 
 
 int read_BP_data_len = 0;
@@ -481,6 +490,31 @@ char SPO2_test(void)
        
     return send_spo2_data_flag;
 }
+char wear_test(void)
+{
+       char irq_flag;
+       while(send_wear_data_flag)//放入定时测量的值
+       {
+               while(gpio_get_pin_value(GPIO_PORT_C, GPIO_BIT_7)==1&&send_wear_data_flag)//等待HR_INT变低    
+               {
+                       //co_printf("  get_SPO2_waite \n");     
+                       //vcHr02IRQHandler();   
+                       co_delay_100us(10);
+                       irq_flag=1;
+                       uart0_receive();//串口0接收数据处理
+               }  
+               while((gpio_get_pin_value(GPIO_PORT_C, GPIO_BIT_7)==0)&&irq_flag&&send_wear_data_flag)//等待HR_INT变高 
+               {       
+                       irq_flag=0;     
+                       uart0_receive();//串口0接收数据处理
+
+                       vc9202_usr_interrupt_handler(SPORT_TYPE_NORMAL,1);
+                               
+               }
+       }
+       
+    return send_wear_data_flag;
+}
 //工厂模式
 char factory_test(void)
 {
@@ -519,6 +553,7 @@ void YYL_test_timer(void)
        }
 }
 int YYL_test_count = 0;
+extern unsigned int yyl_time;
 void YYL_out_data(void)
 {
        yylPFE_OutputData *pOutputData; 
@@ -547,10 +582,10 @@ void YYL_out_data(void)
                        // if(pOutputData_tmp->timestamp==0&&pOutputData_tmp->areaUP==0&&pOutputData_tmp->areaUPBase==0&&pOutputData_tmp->areaUPHeight==0)
                        //      break;
                        //co_printf("pOutputData_tmp:%x\n",pOutputData_tmp);
-                       unsigned int time_tmp = get_timestamp();
+                       
                        UART_send_buf_len = snprintf((char *)UART_send_buf,UART_SEND_MAX,
                                                                        "%u,%d,%d,%d,%d,%d,%d,%d,%d,%d,",
-                                                                               time_tmp,pOutputData_tmp->timestamp,pOutputData_tmp->areaUP,pOutputData_tmp->areaUPBase,pOutputData_tmp->areaUPHeight,
+                                                                               yyl_time,pOutputData_tmp->timestamp,pOutputData_tmp->areaUP,pOutputData_tmp->areaUPBase,pOutputData_tmp->areaUPHeight,
                                                                                pOutputData_tmp->areaDOWN,pOutputData_tmp->areaDOWNBase,pOutputData_tmp->areaDOWNHeight,pOutputData_tmp->RRI,pOutputData_tmp->motion);
                        uart0_write_for_hci(UART_send_buf,UART_send_buf_len,NULL, NULL);
                        UART_send_buf[UART_send_buf_len] = 0;
@@ -659,6 +694,14 @@ void temp_test(void)
     
        
        //send_temp_data_flag=0;
+       //开佩戴
+       gpio_set_pin_value(GPIO_PORT_A, GPIO_BIT_0, 1);  //心率使能 
+       gpio_set_pin_value(GPIO_PORT_A, GPIO_BIT_1, 0); //血压使能
+       //pmu_port_wakeup_func_set(GPIO_PC7);//使能心率中断
+       pInit_Param.work_mode = WORK_MODE_WEAR;
+       vc9202_usr_init(&pInit_Param);
+       vc9202_usr_interrupt_handler(SPORT_TYPE_NORMAL,1);//中断里更新佩戴状态
+
        get_tp_data();
        UART_send_buf_len = snprintf((char *)UART_send_buf,UART_SEND_MAX,"{\"cmd\":\"2\",\"temp_data\":\"");
        uart0_write_for_hci(UART_send_buf,UART_send_buf_len,NULL, NULL); 
@@ -685,30 +728,33 @@ void gsensor_test(void)
        
        //gsensor_init();
        signed short  sl_x_dat[5], sl_y_dat[5],sl_z_dat[5];
+       SL_SC7A20_GET_DATA( sl_x_dat, sl_y_dat, sl_z_dat);
        // sl_x_dat[5], sl_y_dat[5],sl_z_dat[5];
-       UART_send_buf_len = snprintf((char *)UART_send_buf,UART_SEND_MAX,"{\"cmd\":\"2\",\"gsensor_data\":\"");
+       UART_send_buf_len = snprintf((char *)UART_send_buf,UART_SEND_MAX,
+                                                                       "{\"cmd\":\"2\",\"gsensor_data\":\"%d,%d,%d\"}",
+                                                                       sl_x_dat[0],sl_y_dat[0],sl_z_dat[0]);
        uart0_write_for_hci(UART_send_buf,UART_send_buf_len,NULL, NULL); 
-       for(uint8_t i=0;i<5;i++)//转码
-       {
-               uintTOstr(sl_x_dat[i]);
-               uart_putc_noint(UART0,str_high);
-               uart_putc_noint(UART0,str_low);
-       }
-       uart_putc_noint(UART0,'/'); 
-       for(uint8_t i=0;i<5;i++)//转码
-       {
-               uintTOstr(sl_y_dat[i]);
-               uart_putc_noint(UART0,str_high);
-               uart_putc_noint(UART0,str_low);
-       }
-       uart_putc_noint(UART0,'/'); 
-       for(uint8_t i=0;i<5;i++)//转码
-       {
-               uintTOstr(sl_z_dat[i]);
-               uart_putc_noint(UART0,str_high);
-               uart_putc_noint(UART0,str_low);
-       }
-       uart0_write_for_hci(uart0_residue_data, 3,  NULL, NULL);        
+       // for(uint8_t i=0;i<5;i++)//转码
+       // {
+       //      uintTOstr(sl_x_dat[i]);
+       //      uart_putc_noint(UART0,str_high);
+       //      uart_putc_noint(UART0,str_low);
+       // }
+       // uart_putc_noint(UART0,'/'); 
+       // for(uint8_t i=0;i<5;i++)//转码
+       // {
+       //      uintTOstr(sl_y_dat[i]);
+       //      uart_putc_noint(UART0,str_high);
+       //      uart_putc_noint(UART0,str_low);
+       // }
+       // uart_putc_noint(UART0,'/'); 
+       // for(uint8_t i=0;i<5;i++)//转码
+       // {
+       //      uintTOstr(sl_z_dat[i]);
+       //      uart_putc_noint(UART0,str_high);
+       //      uart_putc_noint(UART0,str_low);
+       // }
+       // uart0_write_for_hci(uart0_residue_data, 3,  NULL, NULL);     
        
 }
 
@@ -817,6 +863,19 @@ void SPO2_open(void)//血氧
        
        //vc9202_usr_interrupt_handler(SPORT_TYPE_NORMAL,1);
 }
+void wear_open(void)//佩戴
+{
+
+       gpio_set_pin_value(GPIO_PORT_A, GPIO_BIT_0, 1);  //心率使能 
+       gpio_set_pin_value(GPIO_PORT_A, GPIO_BIT_1, 0); //血压使能
+       //pmu_port_wakeup_func_set(GPIO_PC7);//使能心率中断
+       pInit_Param.work_mode = WORK_MODE_WEAR;
+       vc9202_usr_init(&pInit_Param);
+       send_wear_data_flag = 1;
+       co_printf("  wear_open \n");
+       
+       //vc9202_usr_interrupt_handler(SPORT_TYPE_NORMAL,1);
+}
 void factory_open(void)//工厂模式
 {
 
@@ -872,6 +931,8 @@ void sensor_while(void)
                SPO2_test();
                // /////////////////////中医测量/////////////////////////////
                YYL_test();
+               // /////////////////////佩戴模式模式/////////////////////////////
+               wear_test();
                // /////////////////////工厂模式/////////////////////////////
                factory_test();
        }
@@ -959,5 +1020,7 @@ void sensor_init(void)
        get_tp_data();
        gsensor_init();//gsensor初始化
 
+       //wear_open();//佩戴
+       //YYL_open();//中医
        //SPO2_open();
 }
index 7ddd9e5..72b540b 100644 (file)
@@ -19,12 +19,14 @@ void EMO_open(void);//情绪
 void YYL_open(void);//中医
 void HRS_open(void);//心率
 void SPO2_open(void);//血氧
+void wear_open(void);//佩戴
 void sensor_close(void);
 void gsensor_init(void);
 char BP_test(void);
 char HRS_test(void);
 char HRV_test(void);
 char SPO2_test(void);
+char wear_test(void);
 char YYL_test(void);
 void YYL_test_timer(void);
 char EMO_test(void);
index c6d1530..1caf243 100644 (file)
@@ -316,10 +316,13 @@ unsigned int timer0_count = 0;
 extern unsigned int timestamp_d; //秒的时间戳,需要配合RTC使用
 extern unsigned int uart0_timer;//判断主机是否在线的超时时间计数
 extern unsigned int yyl_timer;
+extern unsigned int gsensor_timer_10ms;
 __attribute__((weak)) __attribute__((section("ram_code"))) void timer0_isr_ram(void)
 {
     timer_clear_interrupt(TIMER0);
     timer0_count++;
+    if(gsensor_timer_10ms < 10000000)
+        gsensor_timer_10ms++;
     if(timer0_count > 100)
     {
         timer0_count=0;
index 2591d6a..2274094 100644 (file)
@@ -6,7 +6,7 @@
   <Header>### uVision Project, (C) Keil Software</Header>
 
   <PrjGuiSettings>
-    <LastAddFilePath></LastAddFilePath>
+    <LastAddFilePath>H:\1.work\3.ASR\3.Z5\1.doc\K18\BLE_Watch\keil\VC9202</LastAddFilePath>
   </PrjGuiSettings>
 
   <ViewPool/>
@@ -15,7 +15,7 @@
     <View>
       <WinId>38003</WinId>
       <ViewName>Registers</ViewName>
-      <TableColWidths>140 90</TableColWidths>
+      <TableColWidths>197 198</TableColWidths>
     </View>
     <View>
       <WinId>346</WinId>
         <yPos>-1</yPos>
       </MaxPosition>
       <NormalPosition>
-        <Top>138</Top>
-        <Left>757</Left>
-        <Right>2256</Right>
-        <Bottom>1067</Bottom>
+        <Top>141</Top>
+        <Left>-164</Left>
+        <Right>1544</Right>
+        <Bottom>974</Bottom>
       </NormalPosition>
     </WindowPosition>
     <MDIClientArea>
       <RegID>0</RegID>
       <MDITabState>
-        <Len>1026</Len>
-        <Data>0100000004000000010000000100000001000000010000000000000002000000000000000100000001000000000000002800000028000000010000000800000003000000010000004D483A5C312E776F726B5C332E4153525C332E5A355C312E646F635C4B31385C424C455F57617463685C6B65696C5C5643393230325C7663393230325F6472697665725F746573746D6F64652E6300000000187663393230325F6472697665725F746573746D6F64652E6300000000C5D4F200FFFFFFFF61483A5C312E776F726B5C332E4153525C332E5A355C312E646F635C4B31385C424C455F57617463685C6B65696C5C534C5F57617463685F5065646F5F4B63616C5F57726973745F536C6565705F537761795F4C5F4170706C69636174696F6E2E630000000033534C5F57617463685F5065646F5F4B63616C5F57726973745F536C6565705F537761795F4C5F4170706C69636174696F6E2E6300000000FFDC7800FFFFFFFF4F483A5C312E776F726B5C332E4153525C332E5A355C312E646F635C4B31385C424C455F57617463685C636F6D706F6E656E74735C626C655C696E636C7564655C6D6573685C6D6573685F6170692E68000000000A6D6573685F6170692E6800000000BECEA100FFFFFFFF42483A5C312E776F726B5C332E4153525C332E5A355C312E646F635C4B31385C424C455F57617463685C6B65696C5C5643393230325C7663393230325F757365722E63000000000D7663393230325F757365722E6300000000F0A0A100FFFFFFFF3C483A5C312E776F726B5C332E4153525C332E5A355C312E646F635C4B31385C424C455F57617463685C636F64655C73656E736F725F64726976652E63000000000E73656E736F725F64726976652E6300000000BCA8E100FFFFFFFF4E483A5C312E776F726B5C332E4153525C332E5A355C312E646F635C4B31385C424C455F57617463685C636F6D706F6E656E74735C626C655C70726F66696C65735C626C655F6F74615C6F74612E6300000000056F74612E63000000009CC1B600FFFFFFFF39483A5C312E776F726B5C332E4153525C332E5A355C312E646F635C4B31385C424C455F57617463685C636F64655C70726F6A5F6D61696E2E63000000000B70726F6A5F6D61696E2E6300000000F7B88600FFFFFFFF39483A5C312E776F726B5C332E4153525C332E5A355C312E646F635C4B31385C424C455F57617463685C6B65696C5C626C655F355F302E736374000000000B626C655F355F302E73637400000000D9ADC200FFFFFFFF0100000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD500010000000000000002000000F1030000F8000000C80800004E030000</Data>
+        <Len>556</Len>
+        <Data>0100000004000000010000000100000001000000010000000000000002000000000000000100000001000000000000002800000028000000010000000400000003000000010000004D483A5C312E776F726B5C332E4153525C332E5A355C312E646F635C4B31385C424C455F57617463685C6B65696C5C5643393230325C7663393230325F6472697665725F746573746D6F64652E6300000000187663393230325F6472697665725F746573746D6F64652E6300000000C5D4F200FFFFFFFF3C483A5C312E776F726B5C332E4153525C332E5A355C312E646F635C4B31385C424C455F57617463685C636F64655C73656E736F725F64726976652E63000000000E73656E736F725F64726976652E6300000000FFDC7800FFFFFFFF42483A5C312E776F726B5C332E4153525C332E5A355C312E646F635C4B31385C424C455F57617463685C6B65696C5C5643393230325C7663393230325F757365722E63000000000D7663393230325F757365722E6300000000BECEA100FFFFFFFF34483A5C312E776F726B5C332E4153525C332E5A355C312E646F635C4B31385C424C455F57617463685C6B65696C5C756172742E630000000006756172742E6300000000F0A0A100FFFFFFFF0100000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD500010000000000000002000000FD000000FB00000000060000F1020000</Data>
       </MDITabState>
     </MDIClientArea>
     <ViewEx>
         </RectRecentDocked>
         <RectRecentFloat>
           <Len>16</Len>
-          <Data>1901000030010000B5050000BE010000</Data>
+          <Data>C5020000D70000006107000065010000</Data>
         </RectRecentFloat>
       </Window>
       <Window>
         <RecentRowIndex>0</RecentRowIndex>
         <RectRecentDocked>
           <Len>16</Len>
-          <Data>0300000066000000ED0000008C020000</Data>
+          <Data>0300000066000000920100002C020000</Data>
         </RectRecentDocked>
         <RectRecentFloat>
           <Len>16</Len>
         <RecentRowIndex>0</RecentRowIndex>
         <RectRecentDocked>
           <Len>16</Len>
-          <Data>0300000066000000ED0000008C020000</Data>
+          <Data>0300000066000000920100002C020000</Data>
         </RectRecentDocked>
         <RectRecentFloat>
           <Len>16</Len>
         <RecentRowIndex>0</RecentRowIndex>
         <RectRecentDocked>
           <Len>16</Len>
-          <Data>0300000066000000ED0000008C020000</Data>
+          <Data>0300000066000000920100002C020000</Data>
         </RectRecentDocked>
         <RectRecentFloat>
           <Len>16</Len>
         <RecentRowIndex>0</RecentRowIndex>
         <RectRecentDocked>
           <Len>16</Len>
-          <Data>0300000066000000ED0000008C020000</Data>
+          <Data>0300000066000000920100002C020000</Data>
         </RectRecentDocked>
         <RectRecentFloat>
           <Len>16</Len>
         <RecentRowIndex>0</RecentRowIndex>
         <RectRecentDocked>
           <Len>16</Len>
-          <Data>03000000C0020000C80500004E030000</Data>
+          <Data>030000006002000099060000EE020000</Data>
         </RectRecentDocked>
         <RectRecentFloat>
           <Len>16</Len>
         <IsActivated>0</IsActivated>
         <MRUWidth>32767</MRUWidth>
         <PinState>0</PinState>
-        <RecentFrameAlignment>4096</RecentFrameAlignment>
+        <RecentFrameAlignment>32768</RecentFrameAlignment>
         <RecentRowIndex>0</RecentRowIndex>
         <RectRecentDocked>
           <Len>16</Len>
-          <Data>03000000C0020000C80500004E030000</Data>
+          <Data>030000006002000099060000EE020000</Data>
         </RectRecentDocked>
         <RectRecentFloat>
           <Len>16</Len>
         <RecentRowIndex>0</RecentRowIndex>
         <RectRecentDocked>
           <Len>16</Len>
-          <Data>0300000066000000ED0000008C020000</Data>
+          <Data>0300000066000000920100008C010000</Data>
         </RectRecentDocked>
         <RectRecentFloat>
           <Len>16</Len>
         <IsActivated>0</IsActivated>
         <MRUWidth>32767</MRUWidth>
         <PinState>0</PinState>
-        <RecentFrameAlignment>4096</RecentFrameAlignment>
+        <RecentFrameAlignment>32768</RecentFrameAlignment>
         <RecentRowIndex>0</RecentRowIndex>
         <RectRecentDocked>
           <Len>16</Len>
-          <Data>03000000C0020000C80500004E030000</Data>
+          <Data>0300000060020000E8040000EE020000</Data>
         </RectRecentDocked>
         <RectRecentFloat>
           <Len>16</Len>
         <IsActivated>0</IsActivated>
         <MRUWidth>32767</MRUWidth>
         <PinState>0</PinState>
-        <RecentFrameAlignment>4096</RecentFrameAlignment>
+        <RecentFrameAlignment>32768</RecentFrameAlignment>
         <RecentRowIndex>0</RecentRowIndex>
         <RectRecentDocked>
           <Len>16</Len>
-          <Data>03000000C0020000C80500004E030000</Data>
+          <Data>0300000060020000E8040000EE020000</Data>
         </RectRecentDocked>
         <RectRecentFloat>
           <Len>16</Len>
         <IsActivated>0</IsActivated>
         <MRUWidth>32767</MRUWidth>
         <PinState>0</PinState>
-        <RecentFrameAlignment>4096</RecentFrameAlignment>
+        <RecentFrameAlignment>32768</RecentFrameAlignment>
         <RecentRowIndex>0</RecentRowIndex>
         <RectRecentDocked>
           <Len>16</Len>
-          <Data>03000000C0020000C80500004E030000</Data>
+          <Data>0300000060020000E8040000EE020000</Data>
         </RectRecentDocked>
         <RectRecentFloat>
           <Len>16</Len>
         <IsActivated>0</IsActivated>
         <MRUWidth>32767</MRUWidth>
         <PinState>0</PinState>
-        <RecentFrameAlignment>4096</RecentFrameAlignment>
+        <RecentFrameAlignment>32768</RecentFrameAlignment>
         <RecentRowIndex>0</RecentRowIndex>
         <RectRecentDocked>
           <Len>16</Len>
-          <Data>03000000C0020000C80500004E030000</Data>
+          <Data>0300000060020000E8040000EE020000</Data>
         </RectRecentDocked>
         <RectRecentFloat>
           <Len>16</Len>
         <RecentRowIndex>0</RecentRowIndex>
         <RectRecentDocked>
           <Len>16</Len>
-          <Data>0000000067030000CB0500007A030000</Data>
+          <Data>00000000070300009C0600001A030000</Data>
         </RectRecentDocked>
         <RectRecentFloat>
           <Len>16</Len>
       </Window>
       <DockMan>
         <Len>3312</Len>
-        <Data>000000000B000000000000000020000000000000FFFFFFFFFFFFFFFFF4000000DD00000090050000E1000000000000000100000004000000010000000000000000000000FFFFFFFF08000000CB00000057010000CC000000F08B00005A01000079070000D601000045890000FFFF02000B004354616262656450616E6500200000000000001901000030010000B5050000BE010000F40000004F00000090050000DD0000000000000040280046080000000B446973617373656D626C7900000000CB00000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A6572000000005701000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A657200000000CC00000001000000FFFFFFFFFFFFFFFF0E4C6F67696320416E616C797A657200000000F08B000001000000FFFFFFFFFFFFFFFF0D436F646520436F766572616765000000005A01000001000000FFFFFFFFFFFFFFFF11496E737472756374696F6E205472616365000000007907000001000000FFFFFFFFFFFFFFFF0F53797374656D20416E616C797A657200000000D601000001000000FFFFFFFFFFFFFFFF104576656E742053746174697374696373000000004589000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFCB00000001000000FFFFFFFFCB000000000000000040000000000000FFFFFFFFFFFFFFFF9C0400004F000000A004000025020000000000000200000004000000010000000000000000000000FFFFFFFF2B000000E2050000CA0900002D8C00002E8C00002F8C0000308C0000318C0000328C0000338C0000348C0000358C0000368C0000378C0000388C0000398C00003A8C00003B8C00003C8C00003D8C00003E8C00003F8C0000408C0000418C000050C3000051C3000052C3000053C3000054C3000055C3000056C3000057C3000058C3000059C300005AC300005BC300005CC300005DC300005EC300005FC3000060C3000061C3000062C3000063C3000001800040000000000000C504000030010000B505000006030000A00400004F000000900500002502000000000000404100462B0000000753796D626F6C7300000000E205000001000000FFFFFFFFFFFFFFFF0A5472616365204461746100000000CA09000001000000FFFFFFFFFFFFFFFF00000000002D8C000001000000FFFFFFFFFFFFFFFF00000000002E8C000001000000FFFFFFFFFFFFFFFF00000000002F8C000001000000FFFFFFFFFFFFFFFF0000000000308C000001000000FFFFFFFFFFFFFFFF0000000000318C000001000000FFFFFFFFFFFFFFFF0000000000328C000001000000FFFFFFFFFFFFFFFF0000000000338C000001000000FFFFFFFFFFFFFFFF0000000000348C000001000000FFFFFFFFFFFFFFFF0000000000358C000001000000FFFFFFFFFFFFFFFF0000000000368C000001000000FFFFFFFFFFFFFFFF0000000000378C000001000000FFFFFFFFFFFFFFFF0000000000388C000001000000FFFFFFFFFFFFFFFF0000000000398C000001000000FFFFFFFFFFFFFFFF00000000003A8C000001000000FFFFFFFFFFFFFFFF00000000003B8C000001000000FFFFFFFFFFFFFFFF00000000003C8C000001000000FFFFFFFFFFFFFFFF00000000003D8C000001000000FFFFFFFFFFFFFFFF00000000003E8C000001000000FFFFFFFFFFFFFFFF00000000003F8C000001000000FFFFFFFFFFFFFFFF0000000000408C000001000000FFFFFFFFFFFFFFFF0000000000418C000001000000FFFFFFFFFFFFFFFF000000000050C3000001000000FFFFFFFFFFFFFFFF000000000051C3000001000000FFFFFFFFFFFFFFFF000000000052C3000001000000FFFFFFFFFFFFFFFF000000000053C3000001000000FFFFFFFFFFFFFFFF000000000054C3000001000000FFFFFFFFFFFFFFFF000000000055C3000001000000FFFFFFFFFFFFFFFF000000000056C3000001000000FFFFFFFFFFFFFFFF000000000057C3000001000000FFFFFFFFFFFFFFFF000000000058C3000001000000FFFFFFFFFFFFFFFF000000000059C3000001000000FFFFFFFFFFFFFFFF00000000005AC3000001000000FFFFFFFFFFFFFFFF00000000005BC3000001000000FFFFFFFFFFFFFFFF00000000005CC3000001000000FFFFFFFFFFFFFFFF00000000005DC3000001000000FFFFFFFFFFFFFFFF00000000005EC3000001000000FFFFFFFFFFFFFFFF00000000005FC3000001000000FFFFFFFFFFFFFFFF000000000060C3000001000000FFFFFFFFFFFFFFFF000000000061C3000001000000FFFFFFFFFFFFFFFF000000000062C3000001000000FFFFFFFFFFFFFFFF000000000063C3000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFE205000001000000FFFFFFFFE2050000000000000010000001000000FFFFFFFFFFFFFFFFF00000004F000000F4000000A50200000100000002000010040000000100000082FEFFFF42040000FFFFFFFF05000000ED0300006D000000C3000000C4000000739400000180001000000100000025000000300100001501000086030000000000004F000000F0000000A50200000000000040410056050000000750726F6A65637401000000ED03000001000000FFFFFFFFFFFFFFFF05426F6F6B73010000006D00000001000000FFFFFFFFFFFFFFFF0946756E6374696F6E7301000000C300000001000000FFFFFFFFFFFFFFFF0954656D706C6174657301000000C400000001000000FFFFFFFFFFFFFFFF09526567697374657273000000007394000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFFED03000001000000FFFFFFFFED030000000000000080000000000000FFFFFFFFFFFFFFFF0000000011020000900500001502000000000000010000000400000001000000000000000000000000000000000000000000000001000000C6000000FFFFFFFF0F0000008F070000930700009407000095070000960700009007000091070000B5010000B801000038030000B9050000BA050000BB050000BC050000CB0900000180008000000000000025000000F6020000B505000098030000000000001502000090050000B702000000000000404100460F0000001343616C6C20537461636B202B204C6F63616C73000000008F07000001000000FFFFFFFFFFFFFFFF0755415254202331000000009307000001000000FFFFFFFFFFFFFFFF0755415254202332000000009407000001000000FFFFFFFFFFFFFFFF0755415254202333000000009507000001000000FFFFFFFFFFFFFFFF15446562756720287072696E74662920566965776572000000009607000001000000FFFFFFFFFFFFFFFF0757617463682031000000009007000001000000FFFFFFFFFFFFFFFF0757617463682032000000009107000001000000FFFFFFFFFFFFFFFF10547261636520457863657074696F6E7300000000B501000001000000FFFFFFFFFFFFFFFF0E4576656E7420436F756E7465727300000000B801000001000000FFFFFFFFFFFFFFFF09554C494E4B706C7573000000003803000001000000FFFFFFFFFFFFFFFF084D656D6F7279203100000000B905000001000000FFFFFFFFFFFFFFFF084D656D6F7279203200000000BA05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203300000000BB05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203400000000BC05000001000000FFFFFFFFFFFFFFFF105472616365204E617669676174696F6E00000000CB09000001000000FFFFFFFFFFFFFFFFFFFFFFFF0000000001000000000000000000000001000000FFFFFFFFC802000015020000CC020000B702000000000000020000000400000000000000000000000000000000000000000000000000000002000000C6000000FFFFFFFF8F07000001000000FFFFFFFF8F07000001000000C6000000000000000080000001000000FFFFFFFFFFFFFFFF00000000A5020000CB050000A9020000010000000100001004000000010000007FFDFFFF8C000000FFFFFFFF06000000C5000000C7000000B4010000D2010000CF0100007794000001800080000001000000250000008A030000F00500004804000000000000A9020000CB050000670300000000000040820056060000000C4275696C64204F757470757401000000C500000001000000FFFFFFFFFFFFFFFF0D46696E6420496E2046696C657301000000C700000001000000FFFFFFFFFFFFFFFF0A4572726F72204C69737400000000B401000001000000FFFFFFFFFFFFFFFF0E536F757263652042726F7773657200000000D201000001000000FFFFFFFFFFFFFFFF0E416C6C205265666572656E63657300000000CF01000001000000FFFFFFFFFFFFFFFF0742726F77736572000000007794000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFFC500000001000000FFFFFFFFC5000000000000000000000000000000</Data>
+        <Data>000000000B000000000000000020000000000000FFFFFFFFFFFFFFFFF4000000DD00000090050000E1000000000000000100000004000000010000000000000000000000FFFFFFFF08000000CB00000057010000CC000000F08B00005A01000079070000D601000045890000FFFF02000B004354616262656450616E650020000000000000C5020000D70000006107000065010000F40000004F00000090050000DD0000000000000040280046080000000B446973617373656D626C7900000000CB00000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A6572000000005701000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A657200000000CC00000001000000FFFFFFFFFFFFFFFF0E4C6F67696320416E616C797A657200000000F08B000001000000FFFFFFFFFFFFFFFF0D436F646520436F766572616765000000005A01000001000000FFFFFFFFFFFFFFFF11496E737472756374696F6E205472616365000000007907000001000000FFFFFFFFFFFFFFFF0F53797374656D20416E616C797A657200000000D601000001000000FFFFFFFFFFFFFFFF104576656E742053746174697374696373000000004589000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFCB00000001000000FFFFFFFFCB000000000000000040000000000000FFFFFFFFFFFFFFFF9C0400004F000000A004000025020000000000000200000004000000010000000000000000000000FFFFFFFF2B000000E2050000CA0900002D8C00002E8C00002F8C0000308C0000318C0000328C0000338C0000348C0000358C0000368C0000378C0000388C0000398C00003A8C00003B8C00003C8C00003D8C00003E8C00003F8C0000408C0000418C000050C3000051C3000052C3000053C3000054C3000055C3000056C3000057C3000058C3000059C300005AC300005BC300005CC300005DC300005EC300005FC3000060C3000061C3000062C3000063C300000180004000000000000071060000D700000061070000AD020000A00400004F000000900500002502000000000000404100462B0000000753796D626F6C7300000000E205000001000000FFFFFFFFFFFFFFFF0A5472616365204461746100000000CA09000001000000FFFFFFFFFFFFFFFF00000000002D8C000001000000FFFFFFFFFFFFFFFF00000000002E8C000001000000FFFFFFFFFFFFFFFF00000000002F8C000001000000FFFFFFFFFFFFFFFF0000000000308C000001000000FFFFFFFFFFFFFFFF0000000000318C000001000000FFFFFFFFFFFFFFFF0000000000328C000001000000FFFFFFFFFFFFFFFF0000000000338C000001000000FFFFFFFFFFFFFFFF0000000000348C000001000000FFFFFFFFFFFFFFFF0000000000358C000001000000FFFFFFFFFFFFFFFF0000000000368C000001000000FFFFFFFFFFFFFFFF0000000000378C000001000000FFFFFFFFFFFFFFFF0000000000388C000001000000FFFFFFFFFFFFFFFF0000000000398C000001000000FFFFFFFFFFFFFFFF00000000003A8C000001000000FFFFFFFFFFFFFFFF00000000003B8C000001000000FFFFFFFFFFFFFFFF00000000003C8C000001000000FFFFFFFFFFFFFFFF00000000003D8C000001000000FFFFFFFFFFFFFFFF00000000003E8C000001000000FFFFFFFFFFFFFFFF00000000003F8C000001000000FFFFFFFFFFFFFFFF0000000000408C000001000000FFFFFFFFFFFFFFFF0000000000418C000001000000FFFFFFFFFFFFFFFF000000000050C3000001000000FFFFFFFFFFFFFFFF000000000051C3000001000000FFFFFFFFFFFFFFFF000000000052C3000001000000FFFFFFFFFFFFFFFF000000000053C3000001000000FFFFFFFFFFFFFFFF000000000054C3000001000000FFFFFFFFFFFFFFFF000000000055C3000001000000FFFFFFFFFFFFFFFF000000000056C3000001000000FFFFFFFFFFFFFFFF000000000057C3000001000000FFFFFFFFFFFFFFFF000000000058C3000001000000FFFFFFFFFFFFFFFF000000000059C3000001000000FFFFFFFFFFFFFFFF00000000005AC3000001000000FFFFFFFFFFFFFFFF00000000005BC3000001000000FFFFFFFFFFFFFFFF00000000005CC3000001000000FFFFFFFFFFFFFFFF00000000005DC3000001000000FFFFFFFFFFFFFFFF00000000005EC3000001000000FFFFFFFFFFFFFFFF00000000005FC3000001000000FFFFFFFFFFFFFFFF000000000060C3000001000000FFFFFFFFFFFFFFFF000000000061C3000001000000FFFFFFFFFFFFFFFF000000000062C3000001000000FFFFFFFFFFFFFFFF000000000063C3000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFE205000001000000FFFFFFFFE2050000000000000010000001000000FFFFFFFFFFFFFFFF950100004F00000099010000450200000100000002000010040000000100000012FFFFFFD2040000FFFFFFFF05000000ED0300006D000000C3000000C40000007394000001800010000001000000D1010000D7000000660300002D020000000000004F00000095010000450200000000000040410056050000000750726F6A65637401000000ED03000001000000FFFFFFFFFFFFFFFF05426F6F6B73010000006D00000001000000FFFFFFFFFFFFFFFF0946756E6374696F6E7301000000C300000001000000FFFFFFFFFFFFFFFF0954656D706C6174657301000000C400000001000000FFFFFFFFFFFFFFFF09526567697374657273000000007394000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFFED03000001000000FFFFFFFFED030000000000000080000000000000FFFFFFFFFFFFFFFF0000000011020000900500001502000000000000010000000400000001000000000000000000000000000000000000000000000001000000C6000000FFFFFFFF0F0000008F070000930700009407000095070000960700009007000091070000B5010000B801000038030000B9050000BA050000BB050000BC050000CB09000001800080000000000000D10100009D020000610700003F030000000000001502000090050000B702000000000000404100460F0000001343616C6C20537461636B202B204C6F63616C73000000008F07000001000000FFFFFFFFFFFFFFFF0755415254202331000000009307000001000000FFFFFFFFFFFFFFFF0755415254202332000000009407000001000000FFFFFFFFFFFFFFFF0755415254202333000000009507000001000000FFFFFFFFFFFFFFFF15446562756720287072696E74662920566965776572000000009607000001000000FFFFFFFFFFFFFFFF0757617463682031000000009007000001000000FFFFFFFFFFFFFFFF0757617463682032000000009107000001000000FFFFFFFFFFFFFFFF10547261636520457863657074696F6E7300000000B501000001000000FFFFFFFFFFFFFFFF0E4576656E7420436F756E7465727300000000B801000001000000FFFFFFFFFFFFFFFF09554C494E4B706C7573000000003803000001000000FFFFFFFFFFFFFFFF084D656D6F7279203100000000B905000001000000FFFFFFFFFFFFFFFF084D656D6F7279203200000000BA05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203300000000BB05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203400000000BC05000001000000FFFFFFFFFFFFFFFF105472616365204E617669676174696F6E00000000CB09000001000000FFFFFFFFFFFFFFFFFFFFFFFF0000000001000000000000000000000001000000FFFFFFFFC802000015020000CC020000B702000000000000020000000400000000000000000000000000000000000000000000000000000002000000C6000000FFFFFFFF8F07000001000000FFFFFFFF8F07000001000000C6000000000000000080000001000000FFFFFFFFFFFFFFFF00000000450200009C06000049020000010000000100001004000000010000007FFDFFFF8C000000FFFFFFFF06000000C5000000C7000000B4010000D2010000CF0100007794000001800080000001000000D101000031020000BC060000EF02000000000000490200009C060000070300000000000040820056060000000C4275696C64204F757470757401000000C500000001000000FFFFFFFFFFFFFFFF0D46696E6420496E2046696C657301000000C700000001000000FFFFFFFFFFFFFFFF0A4572726F72204C69737400000000B401000001000000FFFFFFFFFFFFFFFF0E536F757263652042726F7773657200000000D201000001000000FFFFFFFFFFFFFFFF0E416C6C205265666572656E63657300000000CF01000001000000FFFFFFFFFFFFFFFF0742726F77736572000000007794000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFFC500000001000000FFFFFFFFC5000000000000000000000000000000</Data>
       </DockMan>
       <ToolBar>
         <RegID>59392</RegID>
         <Name>File</Name>
         <Buttons>
           <Len>2946</Len>
-          <Data>00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000040004000000000000000000000000000000000100000001000000018022E100000000040005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000004000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000004000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000400460000000000000000000000000000000001000000010000000180FE880000000004004500000000000000000000000000000000010000000100000001800B810000000004001300000000000000000000000000000000010000000100000001800C810000000004001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE803000000000000000000000000000000000000000000000001000000010000009600000002002050000000000E534C5F535741595F535441545553960000000000000014000E534C5F535741595F53544154555313534C5F444952454354494F4E5F5354415455530B534C5F44495354414E4345096D6573685F696E697412646563696D616C5F706F696E745F7365656E0D75617274315F6973725F72616D0F696E7465726E616C5F6D616C6C6F630648415F42554618737065616B65725F676174745F6164645F736572766963650D6F735F74696D65725F696E69740D706D755F6973725F72616D5F430E7379735F74696D65725F696E69740B636F6E6669675F666C616717534C5F5343374132305F4932635F5370695F5772697465117472616E73706172656E745F73746172740D6170705F61745F726563765F630D75617274305F6973725F72616D0A756172745F706172616D15766353706F72744D6F74696F6E416C676F496E69741273656E645F6872735F646174615F666C61670000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018024E10000000000001100000000000000000000000000000000010000000100000001800A810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E2280000002000000150000002153746172742F53746F70202644656275672053657373696F6E094374726C2B46350000000000000000000000000100000001000000000000000000000001000000020021802280000000000000150000002153746172742F53746F70202644656275672053657373696F6E094374726C2B4635000000000000000000000000010000000100000000000000000000000100000000002180E0010000000000007500000021456E65726779204D6561737572656D656E742026776974686F75742044656275670000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000002180C8880000000000001700000027264B696C6C20416C6C20427265616B706F696E747320696E2043757272656E7420546172676574000000000000000000000000010000000100000000000000000000000100000003002180C8880000000000001700000027264B696C6C20416C6C20427265616B706F696E747320696E2043757272656E7420546172676574000000000000000000000000010000000100000000000000000000000100000000002180E50100000000000078000000264B696C6C20416C6C20427265616B706F696E747320696E204163746976652050726F6A656374000000000000000000000000010000000100000000000000000000000100000000002180E601000000000000790000002F4B696C6C20416C6C20427265616B706F696E747320696E204D756C74692D50726F6A65637420576F726B73706163650000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000021804C010000020001001A0000000F2650726F6A6563742057696E646F77000000000000000000000000010000000100000000000000000000000100000008002180DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002180DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002180E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002180E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000218018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000021800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002180D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002180E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C65C6030000</Data>
+          <Data>00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000040004000000000000000000000000000000000100000001000000018022E100000000040005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000004000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000400460000000000000000000000000000000001000000010000000180FE880000000004004500000000000000000000000000000000010000000100000001800B810000000004001300000000000000000000000000000000010000000100000001800C810000000004001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE803000000000000000000000000000000000000000000000001000000010000009600000002002050000000000E534C5F535741595F535441545553960000000000000014000E534C5F535741595F53544154555313534C5F444952454354494F4E5F5354415455530B534C5F44495354414E4345096D6573685F696E697412646563696D616C5F706F696E745F7365656E0D75617274315F6973725F72616D0F696E7465726E616C5F6D616C6C6F630648415F42554618737065616B65725F676174745F6164645F736572766963650D6F735F74696D65725F696E69740D706D755F6973725F72616D5F430E7379735F74696D65725F696E69740B636F6E6669675F666C616717534C5F5343374132305F4932635F5370695F5772697465117472616E73706172656E745F73746172740D6170705F61745F726563765F630D75617274305F6973725F72616D0A756172745F706172616D15766353706F72744D6F74696F6E416C676F496E69741273656E645F6872735F646174615F666C61670000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018024E10000000000001100000000000000000000000000000000010000000100000001800A810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E2280000002000000150000002153746172742F53746F70202644656275672053657373696F6E094374726C2B46350000000000000000000000000100000001000000000000000000000001000000020021802280000000000000150000002153746172742F53746F70202644656275672053657373696F6E094374726C2B4635000000000000000000000000010000000100000000000000000000000100000000002180E0010000000000007500000021456E65726779204D6561737572656D656E742026776974686F75742044656275670000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000002180C8880000000000001700000027264B696C6C20416C6C20427265616B706F696E747320696E2043757272656E7420546172676574000000000000000000000000010000000100000000000000000000000100000003002180C8880000000000001700000027264B696C6C20416C6C20427265616B706F696E747320696E2043757272656E7420546172676574000000000000000000000000010000000100000000000000000000000100000000002180E50100000000000078000000264B696C6C20416C6C20427265616B706F696E747320696E204163746976652050726F6A656374000000000000000000000000010000000100000000000000000000000100000000002180E601000000000000790000002F4B696C6C20416C6C20427265616B706F696E747320696E204D756C74692D50726F6A65637420576F726B73706163650000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000021804C010000020001001A0000000F2650726F6A6563742057696E646F77000000000000000000000000010000000100000000000000000000000100000008002180DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002180DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002180E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002180E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000218018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000021800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002180D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002180E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C65C6030000</Data>
         </Buttons>
         <OriginalItems>
           <Len>1423</Len>
         <Name>Build</Name>
         <Buttons>
           <Len>976</Len>
-          <Data>00200000010000001000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F0000000000001C0000000000000000000000000000000001000000010000000180D07F0000000000001D000000000000000000000000000000000100000001000000018030800000000002001E000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6EC7040000000000006A0000000C4261746368204275696C2664000000000000000000000000010000000100000000000000000000000100000004000580C7040000000000006A0000000C4261746368204275696C266400000000000000000000000001000000010000000000000000000000010000000000058046070000000000006B0000000D42617463682052656275696C640000000000000000000000000100000001000000000000000000000001000000000005804707000000000000FFFFFFFF0B426174636820436C65616E0100000000000000000000000100000001000000000000000000000001000000000005809E8A0000000000001F0000000F4261746326682053657475702E2E2E000000000000000000000000010000000100000000000000000000000100000000000180D17F0000000004002000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000002100000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6EBA000000000000000000000000000000000000000000000000010000000100000096000000030020500000000008626C655F6D6573689600000000000000010008626C655F6D657368000000000180EB880000000000002200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000230000000000000000000000000000000001000000010000000180B08A000000000400240000000000000000000000000000000001000000010000000180A8010000000000004E00000000000000000000000000000000010000000100000001807202000000000000530000000000000000000000000000000001000000010000000180BE010000000000005000000000000000000000000000000000010000000100000000000000054275696C64DC010000</Data>
+          <Data>00200000010000001000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F0000000000001C0000000000000000000000000000000001000000010000000180D07F0000000000001D000000000000000000000000000000000100000001000000018030800000000000001E000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6EC7040000000000006A0000000C4261746368204275696C2664000000000000000000000000010000000100000000000000000000000100000004000580C7040000000000006A0000000C4261746368204275696C266400000000000000000000000001000000010000000000000000000000010000000000058046070000000000006B0000000D42617463682052656275696C640000000000000000000000000100000001000000000000000000000001000000000005804707000000000000FFFFFFFF0B426174636820436C65616E0100000000000000000000000100000001000000000000000000000001000000000005809E8A0000000000001F0000000F4261746326682053657475702E2E2E000000000000000000000000010000000100000000000000000000000100000000000180D17F0000000004002000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000002100000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6EBA000000000000000000000000000000000000000000000000010000000100000096000000030020500000000008626C655F6D6573689600000000000000010008626C655F6D657368000000000180EB880000000000002200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000230000000000000000000000000000000001000000010000000180B08A000000000400240000000000000000000000000000000001000000010000000180A8010000000000004E00000000000000000000000000000000010000000100000001807202000000000000530000000000000000000000000000000001000000010000000180BE010000000000005000000000000000000000000000000000010000000100000000000000054275696C64DC010000</Data>
         </Buttons>
         <OriginalItems>
           <Len>583</Len>
       <ActiveTab>3</ActiveTab>
       <Doc>
         <Name>.\VC9202\vc9202_driver_testmode.c</Name>
-        <ColumnNumber>16</ColumnNumber>
-        <TopLine>8</TopLine>
-        <CurrentLine>18</CurrentLine>
-        <Folding>1</Folding>
-        <ContractedFolders></ContractedFolders>
-        <PaneID>0</PaneID>
-      </Doc>
-      <Doc>
-        <Name>.\SL_Watch_Pedo_Kcal_Wrist_Sleep_Sway_L_Application.c</Name>
-        <ColumnNumber>0</ColumnNumber>
-        <TopLine>213</TopLine>
-        <CurrentLine>244</CurrentLine>
-        <Folding>1</Folding>
-        <ContractedFolders></ContractedFolders>
-        <PaneID>0</PaneID>
-      </Doc>
-      <Doc>
-        <Name>..\components\ble\include\mesh\mesh_api.h</Name>
-        <ColumnNumber>14</ColumnNumber>
-        <TopLine>350</TopLine>
-        <CurrentLine>389</CurrentLine>
-        <Folding>1</Folding>
-        <ContractedFolders></ContractedFolders>
-        <PaneID>0</PaneID>
-      </Doc>
-      <Doc>
-        <Name>.\VC9202\vc9202_user.c</Name>
-        <ColumnNumber>4</ColumnNumber>
-        <TopLine>347</TopLine>
-        <CurrentLine>357</CurrentLine>
+        <ColumnNumber>18</ColumnNumber>
+        <TopLine>19</TopLine>
+        <CurrentLine>35</CurrentLine>
         <Folding>1</Folding>
         <ContractedFolders></ContractedFolders>
         <PaneID>0</PaneID>
       </Doc>
       <Doc>
         <Name>..\code\sensor_drive.c</Name>
-        <ColumnNumber>33</ColumnNumber>
-        <TopLine>218</TopLine>
-        <CurrentLine>243</CurrentLine>
+        <ColumnNumber>3</ColumnNumber>
+        <TopLine>193</TopLine>
+        <CurrentLine>210</CurrentLine>
         <Folding>1</Folding>
         <ContractedFolders></ContractedFolders>
         <PaneID>0</PaneID>
       </Doc>
       <Doc>
-        <Name>..\components\ble\profiles\ble_ota\ota.c</Name>
-        <ColumnNumber>20</ColumnNumber>
-        <TopLine>1</TopLine>
-        <CurrentLine>27</CurrentLine>
+        <Name>.\VC9202\vc9202_user.c</Name>
+        <ColumnNumber>3</ColumnNumber>
+        <TopLine>353</TopLine>
+        <CurrentLine>369</CurrentLine>
         <Folding>1</Folding>
         <ContractedFolders></ContractedFolders>
         <PaneID>0</PaneID>
       </Doc>
       <Doc>
-        <Name>..\code\proj_main.c</Name>
+        <Name>.\uart.c</Name>
         <ColumnNumber>0</ColumnNumber>
-        <TopLine>317</TopLine>
-        <CurrentLine>358</CurrentLine>
-        <Folding>1</Folding>
-        <ContractedFolders></ContractedFolders>
-        <PaneID>0</PaneID>
-      </Doc>
-      <Doc>
-        <Name>H:\1.work\3.ASR\3.Z5\1.doc\K18\BLE_Watch\keil\ble_5_0.sct</Name>
-        <ColumnNumber>5</ColumnNumber>
-        <TopLine>8</TopLine>
-        <CurrentLine>35</CurrentLine>
+        <TopLine>115</TopLine>
+        <CurrentLine>136</CurrentLine>
         <Folding>1</Folding>
         <ContractedFolders></ContractedFolders>
         <PaneID>0</PaneID>
index 5871850..ebd4732 100644 (file)
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
-      <PathWithFileName>.\VC9202\lib_hr_yll_v0.5.3.012424.lib</PathWithFileName>
-      <FilenameWithoutPath>lib_hr_yll_v0.5.3.012424.lib</FilenameWithoutPath>
+      <PathWithFileName>.\VC9202\lib_hr_yll_v0.5.3.031624.lib</PathWithFileName>
+      <FilenameWithoutPath>lib_hr_yll_v0.5.3.031624.lib</FilenameWithoutPath>
       <RteFlg>0</RteFlg>
       <bShared>0</bShared>
     </File>
index 56474a9..deea2f9 100644 (file)
               <FilePath>.\VC9202\vc9202_user_debug.c</FilePath>
             </File>
             <File>
-              <FileName>lib_hr_yll_v0.5.3.012424.lib</FileName>
+              <FileName>lib_hr_yll_v0.5.3.031624.lib</FileName>
               <FileType>4</FileType>
-              <FilePath>.\VC9202\lib_hr_yll_v0.5.3.012424.lib</FilePath>
+              <FilePath>.\VC9202\lib_hr_yll_v0.5.3.031624.lib</FilePath>
             </File>
           </Files>
         </Group>
index 4533112..981fbf3 100644 (file)
@@ -408,9 +408,10 @@ __attribute__((section("ram_code"))) void IIC0_Write_One_Byte(uint8_t data)
        uint8_t send_count = 0;
        
        I2C_SCL_OUT_L_0;
+       co_delay_10us(1);
        for(send_count=0;send_count<8;send_count++)
        {
-               I2c_Delay(DELAY_TIME4);I2c_Delay(DELAY_TIME4);I2c_Delay(DELAY_TIME4);
+               //co_delay_10us(1);
                if((data<<send_count)&0x80)
                {
                        //os_printf("1");
@@ -421,9 +422,9 @@ __attribute__((section("ram_code"))) void IIC0_Write_One_Byte(uint8_t data)
                        //os_printf("0");
                        I2C_SDA_OUT_L_0;
                }
-               I2c_Delay(DELAY_TIME4);I2c_Delay(DELAY_TIME4);I2c_Delay(DELAY_TIME4);
+               co_delay_10us(2);
                I2C_SCL_OUT_H_0;
-               I2c_Delay(DELAY_TIME4);I2c_Delay(DELAY_TIME4);I2c_Delay(DELAY_TIME4);
+               co_delay_10us(1);
                I2C_SCL_OUT_L_0;
        }
        
@@ -443,7 +444,7 @@ __attribute__((section("ram_code"))) uint8_t IIC0_Read_One_Byte(void)
                //              I2c_Delay(DELAY_TIME1);
                co_delay_10us(1);
                I2C_SCL_OUT_H_0;
-               
+               co_delay_10us(1);
                if(I2C_SDA_IN_VAL_0)
                        data |= (1<<(7-i));
                //else
index f327989..fce511b 100644 (file)
@@ -430,7 +430,7 @@ void SL_Wrist_Fun_Happened(void);
 
 
 signed char SL_SC7A20_PEDO_KCAL_WRIST_SLEEP_SWAY_L_INIT(void);  //初始化调用
-       
+unsigned int  SL_SC7A20_PEDO_KCAL_WRIST_SLEEP_SWAY_L_ALGO(void);       
 #endif/****SL_Watch_ALGO_DRV__H__*********/
 
 
index 10a57dd..8f1b3a8 100644 (file)
@@ -135,12 +135,15 @@ static unsigned char  SL_INT_TIME_CNT          = 0;
 // extern unsigned char sl_sleep_sys_hour;
 unsigned char sl_sleep_sys_hour=1;
 unsigned char SL_MCU_SLEEP_ALGO_FUNCTION(void);
+signed short          SC7A20_XYZ_Buf[3][32] = {0};
+
+unsigned char gsensor_len = 0;
 unsigned int  SL_SC7A20_PEDO_KCAL_WRIST_SLEEP_SWAY_L_ALGO(void)
 {
 #if SL_Sensor_Algo_Release_Enable==0x00
        unsigned char         sl_i;
 #endif
-       signed short          SC7A20_XYZ_Buf[3][14];
+       
        signed short          SC7A20_XYZ_Dat[3];
        unsigned char         SC7A20_FIFO_NUM;
        bool                  SC7A20_INT_STATUS;
@@ -176,6 +179,7 @@ unsigned int  SL_SC7A20_PEDO_KCAL_WRIST_SLEEP_SWAY_L_ALGO(void)
                
            /*******get accel orginal data and length*******/
            SC7A20_FIFO_NUM      = SL_SC7A20_GET_FIFO_Buf(&SC7A20_XYZ_Buf[0][0],&SC7A20_XYZ_Buf[1][0],&SC7A20_XYZ_Buf[2][0],FALSE);
+               gsensor_len = SC7A20_FIFO_NUM;
 #if SL_Sensor_Algo_Release_Enable==0x00                
 //             for(sl_i=0;sl_i<SC7A20_FIFO_NUM;sl_i++)
 //             { 
@@ -223,14 +227,14 @@ unsigned int  SL_SC7A20_PEDO_KCAL_WRIST_SLEEP_SWAY_L_ALGO(void)
                        if(SL_SWAY_STATUS==1)
                        { 
 //                             USART_printf( USART1, "############sway happen!!!!\r\n");
-                               co_printf("############sway happen!!!!\r\n");
+                               //co_printf("############sway happen!!!!\r\n");
                        }
 #endif
                        
            }
                SL_DIRECTION_STATUS= SL_Get_Direction_Status();
                if(SL_DIRECTION_STATUS)
-                       co_printf("SL_DIRECTION_STATUS:%d\r\n",SL_DIRECTION_STATUS);
+                       ;//co_printf("SL_DIRECTION_STATUS:%d\r\n",SL_DIRECTION_STATUS);
        }
        else
        {
index 162bef3..6161f02 100644 (file)
@@ -32,7 +32,7 @@
  ***************************************************************************/
 #define VC9202_CFG_WEAR_DETECTION       (FUNC_ENABLE) // FUNC_DISABLE  FUNC_ENABLE
 #define VC9202_CFG_WEAR_DEFAULT_STATUS  (WEAR_IS_HOLD)  //1 is  default wear,0 is default not wear  WEAR_IS_HOLD  WEAR_IS_DROP
-#define VC9202_CFG_WEAR_BIO_EN        (FUNC_ENABLE)
+#define VC9202_CFG_WEAR_BIO_EN        (FUNC_DISABLE)
 #define VC9202_CFG_WEAR_ALG_EN        (FUNC_DISABLE)   //开启心率摘下功能,必须开启满足(ATC|BIO)为真
 #define VC9202_CFG_WEAR_ACT_EN        (FUNC_DISABLE)
 #define VC9202_CFG_WEAR_THRESHOLD_EN        (FUNC_ENABLE)    //绝对阈值宏开关
index 9fa7d65..7a1adca 100644 (file)
@@ -253,11 +253,12 @@ static VC9202WearChangeTypeDef vc9202_drv_wear_status_identify(VC9202WearInfoTyp
        {
                ret_bio_algo = VC9202_BIO_STA_HOLD; /* 20230614 因为下面的条件把(ret_bio_algo==VC9202_BIO_STA_NONE)佩戴的条件删了,所以此处必须添加,不然在未开bio的模式下无法佩戴*/
        }
+       
 #if (FUNC_DISABLE == VC9202_CFG_WEAR_THRESHOLD_EN)
        BIO_HOLD_DROP_FLAG = 2;
 #endif
 #if (FUNC_DISABLE == VC9202_CFG_WEAR_BIO_EN)
-       ret_bio_algo = VC9202_BIO_STA_NONE;
+       ret_bio_algo = VC9202_BIO_STA_HOLD;
        BIO_HOLD_DROP_FLAG = 2;
 #endif
 #if (FUNC_DISABLE == VC9202_CFG_WEAR_ALG_EN)
@@ -266,6 +267,8 @@ static VC9202WearChangeTypeDef vc9202_drv_wear_status_identify(VC9202WearInfoTyp
 #if (FUNC_DISABLE == VC9202_CFG_WEAR_ACT_EN)
        gsnesor_axis_diff = 1;
 #endif
+       //co_printf("vc9202_drv_wear_status_identify:bio:%d,ps:%d,env:%d,ret_bio_algo:%d,alg_wear_status:%d,gsnesor_axis_diff:%d,BIO_HOLD_DROP_FLAG:%d\r\n",
+       //                                                                                 bio   ,ps   ,env   ,ret_bio_algo   ,alg_wear_status   ,gsnesor_axis_diff   ,BIO_HOLD_DROP_FLAG);
        switch (pwear->wear_status)
        {
        case WEAR_STA_DROP:
@@ -1566,6 +1569,10 @@ unsigned char vc9202_drv_reg_init(InitParamTypeDef *pInit_Param)
        {
                dev9202_info.enable_bio = 0;
        }
+       // co_printf("vc9202_drv_reg_init:write:reg_bio_cfg:0x%2x,0x%2x\r\n",reg_bio_cfg[0],reg_bio_cfg[1]);
+       // memset(reg_bio_cfg,0,2);
+       // usr_iic_read_bytes(0x23, reg_bio_cfg, 2);
+       // co_printf("vc9202_drv_reg_init:read:reg_bio_cfg:0x%2x,0x%2x\r\n",reg_bio_cfg[0],reg_bio_cfg[1]);
        vc9202_drv_system_param_init(fifo_div, reg_cfg[0]);
        /* mode位置1,芯片开始工作 */
        vc9202_drv_start_sampling();
index 62a9b6f..09cbe19 100644 (file)
@@ -369,7 +369,10 @@ void gsensor_data_match(AxesRaw_t *org_data, GsensorTypeDef *pGsensorParam, unsi
        }
 }
 #endif
-
+unsigned int gsensor_timer_10ms = 0;
+extern signed short SC7A20_XYZ_Buf[3][32];
+extern unsigned char gsensor_len;
+//unsigned int  SL_SC7A20_PEDO_KCAL_WRIST_SLEEP_SWAY_L_ALGO(void)
 static void get_gsensor_data( GsensorTypeDef *pGsensorParam, unsigned char *pgsensor_len, unsigned char ppg_size )
 {
        /*
@@ -378,82 +381,58 @@ static void get_gsensor_data( GsensorTypeDef *pGsensorParam, unsigned char *pgse
        */
 #if ENABLE_GSENSOR
        unsigned char i = 0;
-       unsigned char gsensor_len = 0;
-       AxesRaw_t gsensor_buff[40] = {0};
+       //AxesRaw_t gsensor_buff[40] = {0};
        pGsensorParam->sampling_rate = 25;
        pGsensorParam->sensing_range = 4;
        pGsensorParam->effective_bits = 12;
        // stk8321_get_fifo_data(&gsensor_len, gsensor_buff);
        //unsigned char SC7A20_FIFO_NUM = 0;
-       signed short SC7A20_XYZ_Buf[3][32];
-       gsensor_len= SL_SC7A20_Read_FIFO();     
-       gsensor_len= SL_SC7A20_GET_FIFO_Buf(&SC7A20_XYZ_Buf[0][0],&SC7A20_XYZ_Buf[1][0],&SC7A20_XYZ_Buf[2][0],FALSE);   
-       if(ppg_size>sizeof(gsensor_buff)/sizeof(AxesRaw_t))
+       if(gsensor_timer_10ms > 8)//最快80ms更新一次
        {
-               ppg_size = sizeof(gsensor_buff)/sizeof(AxesRaw_t);
+               SL_SC7A20_PEDO_KCAL_WRIST_SLEEP_SWAY_L_ALGO();
+               gsensor_timer_10ms = 0;
        }
                
-       //co_printf("get_gsensor_data:gsensor_len:%d ppg_size:%d\n",gsensor_len,ppg_size);
+       //co_printf("get_gsensor_data:gsensor_len:%d ppg_size:%d\r\n",gsensor_len,ppg_size);
        if(ppg_size>gsensor_len)
        {
                for(i=0;i<ppg_size;i++)
                {
-                               gsensor_buff[i].AXIS_X= SC7A20_XYZ_Buf[0][i/(ppg_size/gsensor_len+1)]>>5;
-                               gsensor_buff[i].AXIS_Y = SC7A20_XYZ_Buf[1][i/(ppg_size/gsensor_len+1)]>>5;
-                               gsensor_buff[i].AXIS_Z = SC7A20_XYZ_Buf[2][i/(ppg_size/gsensor_len+1)]>>5;
+                       pGsensorParam->gsensor_x_axis[i]= SC7A20_XYZ_Buf[0][i/(ppg_size/gsensor_len+1)]>>5;
+                       pGsensorParam->gsensor_y_axis[i] = SC7A20_XYZ_Buf[1][i/(ppg_size/gsensor_len+1)]>>5;
+                       pGsensorParam->gsensor_z_axis[i] = SC7A20_XYZ_Buf[2][i/(ppg_size/gsensor_len+1)]>>5;
+                       //co_printf("gsr:X:%04d,Y:%04d,Z:%04d x:%04d,y:%04d,z:%04d\r\n",pGsensorParam->gsensor_x_axis[i],pGsensorParam->gsensor_y_axis[i],pGsensorParam->gsensor_z_axis[i]
+                       //,SC7A20_XYZ_Buf[0][i/(ppg_size/gsensor_len+1)],SC7A20_XYZ_Buf[1][i/(ppg_size/gsensor_len+1)],SC7A20_XYZ_Buf[2][i/(ppg_size/gsensor_len+1)]);
                }
        }else
        {
                for(i=0;i<ppg_size;i++)
                {
-                               gsensor_buff[i].AXIS_X= SC7A20_XYZ_Buf[0][i]>>4;
-                               gsensor_buff[i].AXIS_Y = SC7A20_XYZ_Buf[1][i]>>4;
-                               gsensor_buff[i].AXIS_Z = SC7A20_XYZ_Buf[2][i]>>4;
+                       pGsensorParam->gsensor_x_axis[i]= SC7A20_XYZ_Buf[0][i]>>5;
+                       pGsensorParam->gsensor_y_axis[i] = SC7A20_XYZ_Buf[1][i]>>5;
+                       pGsensorParam->gsensor_z_axis[i] = SC7A20_XYZ_Buf[2][i]>>5;
+                       //co_printf("gsr:X:%04d,Y:%04d,Z:%04d x:%04d,y:%04d,z:%04d\r\n",pGsensorParam->gsensor_x_axis[i],pGsensorParam->gsensor_y_axis[i],pGsensorParam->gsensor_z_axis[i]
+                       //,SC7A20_XYZ_Buf[0][i/(ppg_size/gsensor_len+1)],SC7A20_XYZ_Buf[1][i/(ppg_size/gsensor_len+1)],SC7A20_XYZ_Buf[2][i/(ppg_size/gsensor_len+1)]);
                }
        }
-
+       // //处理已使用的gsensor
+       // if(ppg_size < gsensor_len)
+       // {
+       //      for(i=0;i<(gsensor_len-ppg_size);i++)
+       //      {
+       //              if(i < 32 && i+ppg_size<32)
+       //              {
+       //                      SC7A20_XYZ_Buf[0][i] = SC7A20_XYZ_Buf[0][i+ppg_size];
+       //                      SC7A20_XYZ_Buf[1][i] = SC7A20_XYZ_Buf[1][i+ppg_size];
+       //                      SC7A20_XYZ_Buf[2][i] = SC7A20_XYZ_Buf[2][i+ppg_size];
+       //              }
+       //      }
+       //      gsensor_len = gsensor_len - ppg_size;
+       // }
        
-       gsensor_len = ppg_size;
-       if (ppg_size == 0)
-       {
-               *pgsensor_len = gsensor_len;
-               /* 不抽样 */
-               for (i = 0; i < *pgsensor_len; i++)
-               {
-                       pGsensorParam->gsensor_x_axis[i] = gsensor_buff[i].AXIS_X;
-                       pGsensorParam->gsensor_y_axis[i] = gsensor_buff[i].AXIS_Y;
-                       pGsensorParam->gsensor_z_axis[i] = gsensor_buff[i].AXIS_Z;
-               }
-       }
-       /* 此demo中gsensor的采样频率高于ppg采样,所以正常情况下,gsensor的数量一定是大于ppg的数据。特殊情况需要考虑ppg数量大于gsensor数量。需要对gsensor数据进行补长 */
-       if( (gsensor_len>=ppg_size)&&(ppg_size!=0) )
-       {
-               *pgsensor_len = ppg_size;
-               for (i = 0; i < *pgsensor_len; i++)
-               {
-                       pGsensorParam->gsensor_x_axis[i] = gsensor_buff[i].AXIS_X;
-                       pGsensorParam->gsensor_y_axis[i] = gsensor_buff[i].AXIS_Y;
-                       pGsensorParam->gsensor_z_axis[i] = gsensor_buff[i].AXIS_Z;
-               }
        
-               // gsensor_data_match( gsensor_buff,pGsensorParam, ppg_size );
-       }
-       else if( (gsensor_len<ppg_size)&&(gsensor_len!=0) ) /* gsensor不足补全 */
-       {
-               *pgsensor_len = gsensor_len;
-               for( i=0; i<gsensor_len; i++ )
-               {
-                       pGsensorParam->gsensor_x_axis[i] = gsensor_buff[i].AXIS_X;
-                       pGsensorParam->gsensor_y_axis[i] = gsensor_buff[i].AXIS_Y;
-                       pGsensorParam->gsensor_z_axis[i] = gsensor_buff[i].AXIS_Z;
-               }
-               for( i=gsensor_len; i<ppg_size; i++ )
-               {
-                       pGsensorParam->gsensor_x_axis[i] = gsensor_buff[gsensor_len-1].AXIS_X;
-                       pGsensorParam->gsensor_y_axis[i] = gsensor_buff[gsensor_len-1].AXIS_Y;
-                       pGsensorParam->gsensor_z_axis[i] = gsensor_buff[gsensor_len-1].AXIS_Z;
-               }
-       }
+       *pgsensor_len = ppg_size;
+       
 #else
        for (int i = 0; i < ppg_size; i++)
        {
@@ -704,9 +683,10 @@ static short int alg_calculate_hrv_handler( short int last_hr_val, SamplingDataT
        }
        return heart_rate_value;
 }
+unsigned int yyl_time = 0;
 void vc9202_usr_interrupt_handler( AlgoSportMode hr_alg_mode, unsigned char spo2_alg_mode )
 {
-       unsigned char wear_status = WEAR_STA_NONE;
+       //unsigned char wear_status = WEAR_STA_NONE;
        SamplingDataTypeDef data = {0};
        GsensorTypeDef gsensor_data = {0};
        unsigned char gsensor_size = 0;
@@ -725,13 +705,13 @@ void vc9202_usr_interrupt_handler( AlgoSportMode hr_alg_mode, unsigned char spo2
                case WORK_MODE_HR:
                        if( vc9202_usr_get_int_reason()&(VC9202_EVENT_PS_MARK|VC9202_EVENT_FIFO_MARK) )
                        {
-                               wear_status = vc9202_usr_get_wear_status();
+                               vc9202_alg_results.wear_status = vc9202_usr_get_wear_status();
                                get_gsensor_data(&gsensor_data, &gsensor_size, ppg_size);
                                if( gsensor_size>0 )
                                {
                                        vc9202_usr_gsensor_actuating_quantity( gsensor_data.gsensor_x_axis[0], gsensor_data.gsensor_y_axis[0], gsensor_data.gsensor_z_axis[0] );
                                }
-                               if(wear_status)
+                               if(vc9202_alg_results.wear_status)
                                {
                                        vc9202_alg_results.hr_rate = alg_calculate_hr_handler( vc9202_alg_results.hr_rate, &data, ppg_size, &gsensor_data, hr_alg_mode );
                                        
@@ -742,15 +722,17 @@ void vc9202_usr_interrupt_handler( AlgoSportMode hr_alg_mode, unsigned char spo2
                                        vc9202_alg_results.hr_rate = 0;
                                        Algo_Init();
                                }
+                               //co_printf("WORK_MODE_WEAR:wear_status: %d\r\n",vc9202_alg_results.wear_status);
                        }
                        break;
 
                case WORK_MODE_SPO2:
                        if( vc9202_usr_get_int_reason()&(VC9202_EVENT_PS_MARK|VC9202_EVENT_FIFO_MARK) )
                        {
-                               wear_status = vc9202_usr_get_wear_status();
+                               vc9202_alg_results.wear_status = vc9202_usr_get_wear_status();
+                               
                                get_gsensor_data(&gsensor_data, &gsensor_size, ppg_size);
-                               if(wear_status)
+                               if(vc9202_alg_results.wear_status)
                                {
                                        vc9202_alg_results.spo2_val = alg_calculate_spo2_handler( vc9202_alg_results.spo2_val, &data, ppg_size/2, &gsensor_data, spo2_alg_mode );
                                        //vc9202_debug_send_spo2_data( &data, &gsensor_data, vc9202_alg_results.spo2_val, ppg_size/2 );
@@ -768,18 +750,24 @@ void vc9202_usr_interrupt_handler( AlgoSportMode hr_alg_mode, unsigned char spo2
                        if( vc9202_usr_get_int_reason()&(VC9202_EVENT_PS_MARK|VC9202_EVENT_FIFO_MARK) )
                        {
                                //co_printf("WORK_MODE_HRV0\n");
-                               wear_status = vc9202_usr_get_wear_status();
+                               vc9202_alg_results.wear_status = vc9202_usr_get_wear_status();
+                               //co_printf("WORK_MODE_HRV:wear_status: %d\r\n",vc9202_alg_results.wear_status);
                                get_gsensor_data(&gsensor_data, &gsensor_size, ppg_size);
                                //co_printf("WORK_MODE_HRV1\n");
                                yylPFE_InputData_t yyl_in_data = {0};
-                               if(wear_status)
+                               if(vc9202_alg_results.wear_status )
                                {
-                                       if(yyl_in_data_len< 3000-1)
+                                       //co_printf("WORK_MODE_HRV2\n");
+                                       vc9202_alg_results.hr_rate = alg_calculate_hrv_handler( vc9202_alg_results.hr_rate, &data, ppg_size, &gsensor_data, hr_alg_mode );
+                                       if(yyl_in_data_len< 3000-1 && ppg_size != 0)
                                        {
-                                               //co_printf("WORK_MODE_HRV2\n");
-                                               vc9202_alg_results.hr_rate = alg_calculate_hrv_handler( vc9202_alg_results.hr_rate, &data, ppg_size, &gsensor_data, hr_alg_mode );
+                                               if(yyl_in_data_len == 0)
+                                               {
+                                                       yyl_time = get_timestamp();
+                                               }
+                                                       
                                                /* 校验+算法HRV */
-                                               co_printf("WORK_MODE_HRV hr:%d ppg_size:%d \r\nPPG:",vc9202_alg_results.hr_rate,ppg_size);
+                                               //co_printf("WORK_MODE_HRV hr:%d ppg_size:%d \r\nPPG:",vc9202_alg_results.hr_rate,ppg_size);
                                                for(int i=0;i<ppg_size;i++)
                                                {
                                                        //data.ppg_data[i] = 1008;
@@ -790,7 +778,8 @@ void vc9202_usr_interrupt_handler( AlgoSportMode hr_alg_mode, unsigned char spo2
                                                        yyl_in_data.axes.y = gsensor_data.gsensor_y_axis[i];
                                                        yyl_in_data.axes.z = gsensor_data.gsensor_z_axis[i];
                                                        yyl_in_data.ppgSample = data.ppg_data[i];
-                                                       co_printf("H:%d,P:%d,X:%d,Y:%d,Z:%d ||",vc9202_alg_results.hr_rate,data.ppg_data[i],yyl_in_data.axes.x,yyl_in_data.axes.y,yyl_in_data.axes.z);
+                                                       //co_printf("yyl:X:%04d,Y:%04d,Z:%04d \r\n",yyl_in_data.axes.x,yyl_in_data.axes.y,yyl_in_data.axes.z);
+                                                       //co_printf("H:%d,P:%d,X:%d,Y:%d,Z:%d ||",vc9202_alg_results.hr_rate,data.ppg_data[i],yyl_in_data.axes.x,yyl_in_data.axes.y,yyl_in_data.axes.z);
                                                        //co_printf("%d ",data.ppg_data[i]);
                                                        //if(data.ppg_data[i])
                                                        YYL_Input_PFE(&yyl_in_data,vc9202_alg_results.hr_rate);
@@ -798,7 +787,7 @@ void vc9202_usr_interrupt_handler( AlgoSportMode hr_alg_mode, unsigned char spo2
                                                        
                                                }
 
-                                               co_printf(" \n");
+                                               //co_printf(" \n");
                                                //co_printf("WORK_MODE_HRV4 yyl_in_data_len:%d\n",yyl_in_data_len);
                                        }
                                        
@@ -806,7 +795,7 @@ void vc9202_usr_interrupt_handler( AlgoSportMode hr_alg_mode, unsigned char spo2
                                }
                                else
                                {
-                                       //co_printf("wear_status error!!!!\n");
+                                       //co_printf("vc9202_alg_results.wear_status error!!!!\n");
                                        vc9202_alg_results.hr_rate = 0;
                                        Algo_Init();
                                        /* 清空数据+初始化算法 */
@@ -817,9 +806,9 @@ void vc9202_usr_interrupt_handler( AlgoSportMode hr_alg_mode, unsigned char spo2
                case WORK_MODE_STRESS:
                        if( vc9202_usr_get_int_reason()&(VC9202_EVENT_PS_MARK|VC9202_EVENT_FIFO_MARK) )
                        {
-                               wear_status = vc9202_usr_get_wear_status();
+                               vc9202_alg_results.wear_status = vc9202_usr_get_wear_status();
                                get_gsensor_data(&gsensor_data, &gsensor_size, ppg_size);
-                               if(wear_status)
+                               if(vc9202_alg_results.wear_status)
                                {
                                        /* 校验+算法STRESS */
                                }
@@ -833,14 +822,15 @@ void vc9202_usr_interrupt_handler( AlgoSportMode hr_alg_mode, unsigned char spo2
                case WORK_MODE_WEAR:
                        if( vc9202_usr_get_int_reason() & VC9202_EVENT_PS_MARK )
                        {
-                               wear_status = vc9202_usr_get_wear_status();
+                               vc9202_alg_results.wear_status = vc9202_usr_get_wear_status();
                                get_gsensor_data(&gsensor_data, &gsensor_size, ppg_size);
                                if( gsensor_size>0 )
                                {
                                        vc9202_usr_gsensor_actuating_quantity( gsensor_data.gsensor_x_axis[0], gsensor_data.gsensor_y_axis[0], gsensor_data.gsensor_z_axis[0] );
                                }
+                               //co_printf("WORK_MODE_WEAR:wear_status: %d\r\n",vc9202_alg_results.wear_status);
                                /* 根据佩戴状态添加对应的处理代码 */
-                               if(wear_status)
+                               if(vc9202_alg_results.wear_status)
                                {
                                }
                                else
index 9df3043..f40ff59 100644 (file)
@@ -33,6 +33,7 @@ typedef struct
        unsigned char spo2_val;
        unsigned char hrv_results;
        unsigned char stress_results;
+       unsigned char wear_status;
        signed short int temperature_value;
 }AlgoCalcResultsTypeDef;
 
index 3455406..79ca303 100644 (file)
@@ -1,4 +1,4 @@
-;#<FEEDBACK># ARM Linker, 5060960: Last Updated: Sat Mar 16 10:02:04 2024
+;#<FEEDBACK># ARM Linker, 5060960: Last Updated: Sun Apr 07 15:04:04 2024
 ;VERSION 0.2
 ;FILE acpower_add_doublefre.o
 acPower_add_doublefre_init <= USED 0
@@ -915,12 +915,6 @@ sha256_update <= USED 0
 ntf_data <= USED 0
 sp_gatt_add_service <= USED 0
 ;FILE sl_watch_pedo_kcal_wrist_sleep_sway_l_algorithm.o
-SC7A20_ODR_SET <= USED 0
-SL_Adom_GetStatus <= USED 0
-SL_Get_Clock_Status <= USED 0
-SL_Get_Direction_Status <= USED 0
-SL_Get_Phone_Answer_Status <= USED 0
-SL_INT_STATUS_READ <= USED 0
 SL_In_Sleep_Status <= USED 0
 SL_Pedo_GetMotion_Status <= USED 0
 SL_Pedo_Kcal_ResetStepCount <= USED 0
@@ -930,23 +924,16 @@ SL_Pedo_Step_Get_Distance <= USED 0
 SL_Pedo_Step_Get_KCal <= USED 0
 SL_Pedo_Step_Get_Motion_Degree <= USED 0
 SL_Pedo_Step_Get_Step_Per_Min <= USED 0
-SL_Pedo_WorkMode_Reset <= USED 0
 SL_SC7A20_CAL_FUN <= USED 0
 SL_SC7A20_CAL_WRITE <= USED 0
 SL_SC7A20_FIFO_TEST <= USED 0
 SL_SC7A20_MTP_READ <= USED 0
 SL_SC7A20_MTP_WRITE <= USED 0
 SL_SC7A20_Power_Down <= USED 0
-SL_Sleep_Active_Degree <= USED 0
-SL_Sleep_GetStatus <= USED 0
-SL_Sleep_Get_Active_Degree <= USED 0
 SL_Turn_Wrist_Judge_one <= USED 0
-SL_Watch_Kcal_Pedo_Algo <= USED 0
 SL_Watch_Wrist_Algo <= USED 0
 SL_Wrist_Fun_Happened <= USED 0
 ;FILE sl_watch_pedo_kcal_wrist_sleep_sway_l_application.o
-SL_MCU_SLEEP_ALGO_FUNCTION <= USED 0
-SL_SC7A20_PEDO_KCAL_WRIST_SLEEP_SWAY_L_ALGO <= USED 0
 __asm___51_SL_Watch_Pedo_Kcal_Wrist_Sleep_Sway_L_Application_c_702c7d15____REV16 <= USED 0
 __asm___51_SL_Watch_Pedo_Kcal_Wrist_Sleep_Sway_L_Application_c_702c7d15____REVSH <= USED 0
 __asm___51_SL_Watch_Pedo_Kcal_Wrist_Sleep_Sway_L_Application_c_702c7d15____RRX <= USED 0
index 21f2979..cc730ff 100644 (file)
@@ -15,6 +15,7 @@ char send_step_data_flag= 0;//step数据标致位
 char send_wear_data_flag= 0;//wear数据标致位
 uint8_t *uart0_rivce_data = NULL;
 //uint8_t uart0_rivce_data[UART_READ_MAX] ;
+char *Versions = "20240316-v0.5.3.031624";
 int uart0_data_len =0;
 unsigned int timestamp_d = 0; //秒的时间戳,需要配合RTC使用
 unsigned int get_timestamp(void)//获取时间戳
@@ -123,6 +124,7 @@ extern AlgoCalcResultsTypeDef vc9202_alg_results;
 void uart0_receive(void)
 { 
        
+       //return ;
        if(uart0_timer > 100)//100秒没数据,关闭测试
        {
                uart0_timer = 0;
@@ -156,7 +158,7 @@ void uart0_receive(void)
                if(strstr((char *)uart0_rivce_data,"\"bp\""))//bp:血压模式
                {
                        uart0_write_for_hci("{\"cmd\":\"1\",\"work_mode\":\"1\"}\r\n", sizeof("{\"cmd\":\"1\",\"work_mode\":\"1\"}\r\n")-1,  NULL, NULL);
-
+                       vc9202_alg_results.wear_status = 1;//血压暂时不测佩戴
                        BP_open();//血压
                }
                else if(strstr((char *)uart0_rivce_data,"\"hrs\""))//:"hrs"}//hrs:心率模式
@@ -190,7 +192,7 @@ void uart0_receive(void)
                else if(strstr((char *)uart0_rivce_data,"\"wear\""))//:"wear"}//wear:佩戴模式
                { 
                        uart0_write_for_hci("{\"cmd\":\"1\",\"work_mode\":\"1\"}\r\n", sizeof("{\"cmd\":\"1\",\"work_mode\":\"1\"}\r\n")-1,  NULL, NULL);
-                       send_wear_data_flag=1;
+                       wear_open();//佩戴
                }
                else if(strstr((char *)uart0_rivce_data,"\"temp\""))//:"temp"}//temp:温度模式
                { 
@@ -214,6 +216,7 @@ void uart0_receive(void)
                
                if(strstr((char *)uart0_rivce_data,"\"get_data\":\"bp\""))//:"bp"}//bp:获取血压数值
                { 
+                       vc9202_alg_results.wear_status = 1;//血压暂时不测佩戴
                        send_bp_data_flag = 1;
                        if(bp_data_len != 0)
                        {
@@ -280,8 +283,8 @@ void uart0_receive(void)
                        // unsigned char wear = vc9202_usr_get_wear_status();//获取佩戴状态
                        // co_printf("wear_val:%d \n",wear);
                        // memset(UART_send_buf,0,UART_SEND_MAX);
-                       // UART_send_buf_len = snprintf((char *)UART_send_buf,UART_SEND_MAX,"{\"cmd\":\"2\",\"wear_data\":\"%d\"}\n",wear);
-                       // uart0_write_for_hci(UART_send_buf,UART_send_buf_len,NULL, NULL);
+                       //UART_send_buf_len = snprintf((char *)UART_send_buf,UART_SEND_MAX,"{\"cmd\":\"2\",\"wear_data\":\"%d\"}\n",vc9202_alg_results.wear_status);
+                       //uart0_write_for_hci(UART_send_buf,UART_send_buf_len,NULL, NULL);
                }
                if(strstr((char *)uart0_rivce_data,"\"get_data\":\"step\""))//:"step"}//step:获取累计步数
                {
@@ -303,7 +306,7 @@ void uart0_receive(void)
                if(strstr((char *)uart0_rivce_data,"\"get_data\":\"is_HA_activate\""))//:获取恒爱库是否激活状态
                {
                        sensor_INT();//唤醒上位机
-                       UART_send_buf_len = snprintf((char *)UART_send_buf,UART_SEND_MAX,"{\"cmd\":\"2\",\"is_HA_activate\":\"%d\"}\n",is_HA_activate);
+                       UART_send_buf_len = snprintf((char *)UART_send_buf,UART_SEND_MAX,"{\"cmd\":\"2\",\"is_HA_activate\":\"%d,%s\"}\n",is_HA_activate,Versions);
                        uart0_write_for_hci(UART_send_buf, UART_send_buf_len,  NULL, NULL);
                }       
                if(strstr((char *)uart0_rivce_data,"\"get_data\":\"HA_req_code\""))//:获取恒爱库请求码
@@ -317,7 +320,8 @@ void uart0_receive(void)
                        co_printf("HA_req_code:HA_req_code:%s \n",sys_config.HA_req_code);      
                        save_sys_config();//保存配置
                }
-               
+               UART_send_buf_len = snprintf((char *)UART_send_buf,UART_SEND_MAX,"{\"cmd\":\"2\",\"wear_data\":\"%d\"}\n",vc9202_alg_results.wear_status);
+               uart0_write_for_hci(UART_send_buf,UART_send_buf_len,NULL, NULL);
                // memset(UART_send_buf,0,UART_SEND_MAX);
                // UART_send_buf_len = snprintf((char *)UART_send_buf,UART_SEND_MAX,"{\"cmd\":\"2\",\"wear_data\":\"%d\"}\n",wear);
                // uart0_write_for_hci(UART_send_buf,UART_send_buf_len,NULL, NULL);