From 7d13fbde75b58ff4c9deaef95ca0c03a1083f8e8 Mon Sep 17 00:00:00 2001 From: WXK <287788329@qq.com> Date: 星期五, 29 八月 2025 10:26:55 +0800 Subject: [PATCH] 1.9,加入电量新计算方法 测试电池能干多久问题 目前1s检测一下adc --- keil/uwb_simple_example.uvoptx | 325 +++++++++++++++++++---------------------------------- 1 files changed, 118 insertions(+), 207 deletions(-) diff --git a/keil/uwb_simple_example.uvoptx b/keil/uwb_simple_example.uvoptx index 727ba2e..abe1045 100644 --- a/keil/uwb_simple_example.uvoptx +++ b/keil/uwb_simple_example.uvoptx @@ -119,13 +119,13 @@ <TargetDriverDllRegistry> <SetRegEntry> <Number>0</Number> - <Key>CMSIS_AGDI</Key> - <Name>-X"" -O206 -S0 -C0 -P00000000 -TO65554 -TC10000000 -TT10000000 -TP20 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD2020000 -FC1000 -FN1 -FF0MK800X_512K.FLM -FS04000000 -FL080000 -FP0($$Device:MK8000$Flash\MK800X_512K.FLM)</Name> + <Key>DLGUARM</Key> + <Name>d</Name> </SetRegEntry> <SetRegEntry> <Number>0</Number> - <Key>DLGUARM</Key> - <Name>d</Name> + <Key>CMSIS_AGDI</Key> + <Name>-X"" -O206 -S0 -C0 -P00000000 -TO65554 -TC10000000 -TT10000000 -TP20 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD2020000 -FC1000 -FN1 -FF0MK800X_512K.FLM -FS04000000 -FL080000 -FP0($$Device:MK8000$Flash\MK800X_512K.FLM)</Name> </SetRegEntry> <SetRegEntry> <Number>0</Number> @@ -158,272 +158,147 @@ <Ww> <count>0</count> <WinNumber>1</WinNumber> - <ItemText>anchordata_id</ItemText> + <ItemText>tagdist_list,0x10</ItemText> </Ww> <Ww> <count>1</count> <WinNumber>1</WinNumber> - <ItemText>anchordata_dist,0x0A</ItemText> + <ItemText>tagid_list,0x0A</ItemText> </Ww> <Ww> <count>2</count> <WinNumber>1</WinNumber> - <ItemText>temp_internal,0x0A</ItemText> + <ItemText>tag_state</ItemText> </Ww> <Ww> <count>3</count> <WinNumber>1</WinNumber> - <ItemText>poll_rx_num,0x0A</ItemText> + <ItemText>receive_flag</ItemText> </Ww> <Ww> <count>4</count> <WinNumber>1</WinNumber> - <ItemText>pwtag</ItemText> + <ItemText>poll_tx_num</ItemText> </Ww> <Ww> <count>5</count> <WinNumber>1</WinNumber> - <ItemText>Get_anchor_appdata_num,0x0A</ItemText> + <ItemText>tempflag</ItemText> </Ww> <Ww> <count>6</count> <WinNumber>1</WinNumber> - <ItemText>Get_anchor_appdata_flag</ItemText> + <ItemText>ggggg,0x0A</ItemText> </Ww> <Ww> <count>7</count> <WinNumber>1</WinNumber> - <ItemText>g_com_map</ItemText> + <ItemText>nomove_count</ItemText> </Ww> <Ww> <count>8</count> <WinNumber>1</WinNumber> - <ItemText>uwbtasktimer,0x0A</ItemText> + <ItemText>g_com_map</ItemText> </Ww> <Ww> <count>9</count> <WinNumber>1</WinNumber> - <ItemText>Lora_qingqiu_flag</ItemText> + <ItemText>nearbase_num</ItemText> </Ww> <Ww> <count>10</count> <WinNumber>1</WinNumber> - <ItemText>poll_tx_en_start_u32</ItemText> + <ItemText>nearbase_distlist,0x0A</ItemText> </Ww> <Ww> <count>11</count> <WinNumber>1</WinNumber> - <ItemText>tx_en_start_u32,0x0A</ItemText> + <ItemText>mainbase_lost_count</ItemText> </Ww> <Ww> <count>12</count> <WinNumber>1</WinNumber> - <ItemText>tx_en_start_u321,0x0A</ItemText> + <ItemText>nearbaseid_list</ItemText> </Ww> <Ww> <count>13</count> <WinNumber>1</WinNumber> - <ItemText>errors</ItemText> + <ItemText>exsistbase_list</ItemText> </Ww> <Ww> <count>14</count> <WinNumber>1</WinNumber> - <ItemText>Size,0x0A</ItemText> + <ItemText>nearbase_distlist</ItemText> </Ww> <Ww> <count>15</count> <WinNumber>1</WinNumber> - <ItemText>temp1</ItemText> + <ItemText>rx_buf</ItemText> </Ww> <Ww> <count>16</count> <WinNumber>1</WinNumber> - <ItemText>temp2</ItemText> + <ItemText>tx_near_msg</ItemText> </Ww> <Ww> <count>17</count> <WinNumber>1</WinNumber> - <ItemText>temp3</ItemText> + <ItemText>current_count11,0x0A</ItemText> </Ww> <Ww> <count>18</count> <WinNumber>1</WinNumber> - <ItemText>temp4</ItemText> + <ItemText>current_count22,0x0A</ItemText> </Ww> <Ww> <count>19</count> <WinNumber>1</WinNumber> - <ItemText>session_begin</ItemText> + <ItemText>current_count33,0x0A</ItemText> </Ww> <Ww> <count>20</count> <WinNumber>1</WinNumber> - <ItemText>flashdestination,0x0A</ItemText> + <ItemText>current_count44,0x0A</ItemText> </Ww> <Ww> <count>21</count> <WinNumber>1</WinNumber> - <ItemText>temp5</ItemText> + <ItemText>current_count55</ItemText> </Ww> <Ww> <count>22</count> <WinNumber>1</WinNumber> - <ItemText>temp6</ItemText> + <ItemText>current_count,0x0A</ItemText> </Ww> <Ww> <count>23</count> <WinNumber>1</WinNumber> - <ItemText>temp7</ItemText> + <ItemText>temp_tag_count2,0x0A</ItemText> </Ww> <Ww> <count>24</count> <WinNumber>1</WinNumber> - <ItemText>temp8</ItemText> + <ItemText>fVoltage_mv,0x0A</ItemText> </Ww> <Ww> <count>25</count> <WinNumber>1</WinNumber> - <ItemText>jindu</ItemText> + <ItemText>adc_caiji,0x0A</ItemText> </Ww> <Ww> <count>26</count> <WinNumber>1</WinNumber> - <ItemText>final_bag_num</ItemText> + <ItemText>bat_percent,0x0A</ItemText> </Ww> <Ww> <count>27</count> <WinNumber>1</WinNumber> - <ItemText>tagofflinetime[0]</ItemText> + <ItemText>nomove_count</ItemText> </Ww> <Ww> <count>28</count> <WinNumber>1</WinNumber> - <ItemText>tagdist_list[0]</ItemText> - </Ww> - <Ww> - <count>29</count> - <WinNumber>1</WinNumber> - <ItemText>tagid_list[0]</ItemText> - </Ww> - <Ww> - <count>30</count> - <WinNumber>1</WinNumber> - <ItemText>jindu</ItemText> - </Ww> - <Ww> - <count>31</count> - <WinNumber>1</WinNumber> - <ItemText>Lora_qingqiu_bao</ItemText> - </Ww> - <Ww> - <count>32</count> - <WinNumber>1</WinNumber> - <ItemText>errors</ItemText> - </Ww> - <Ww> - <count>33</count> - <WinNumber>1</WinNumber> - <ItemText>MAX_ERRORS</ItemText> - </Ww> - <Ww> - <count>34</count> - <WinNumber>1</WinNumber> - <ItemText>session_done</ItemText> - </Ww> - <Ww> - <count>35</count> - <WinNumber>1</WinNumber> - <ItemText>session_begin</ItemText> - </Ww> - <Ww> - <count>36</count> - <WinNumber>1</WinNumber> - <ItemText>flash_seqno,0x0A</ItemText> - </Ww> - <Ww> - <count>37</count> - <WinNumber>1</WinNumber> - <ItemText>size,0x0A</ItemText> - </Ww> - <Ww> - <count>38</count> - <WinNumber>1</WinNumber> - <ItemText>file_done</ItemText> - </Ww> - <Ww> - <count>39</count> - <WinNumber>1</WinNumber> - <ItemText>packet_length,0x0A</ItemText> - </Ww> - <Ww> - <count>40</count> - <WinNumber>1</WinNumber> - <ItemText>temp10</ItemText> - </Ww> - <Ww> - <count>41</count> - <WinNumber>1</WinNumber> - <ItemText>temp9</ItemText> - </Ww> - <Ww> - <count>42</count> - <WinNumber>1</WinNumber> - <ItemText>taglist_num,0x0A</ItemText> - </Ww> - <Ww> - <count>43</count> - <WinNumber>1</WinNumber> <ItemText>rx_buf</ItemText> - </Ww> - <Ww> - <count>44</count> - <WinNumber>1</WinNumber> - <ItemText>packet_length,0x0A</ItemText> - </Ww> - <Ww> - <count>45</count> - <WinNumber>1</WinNumber> - <ItemText>current_seqno</ItemText> - </Ww> - <Ww> - <count>46</count> - <WinNumber>1</WinNumber> - <ItemText>flashdestination,0x0A</ItemText> - </Ww> - <Ww> - <count>47</count> - <WinNumber>1</WinNumber> - <ItemText>ramsource,0x0A</ItemText> - </Ww> - <Ww> - <count>48</count> - <WinNumber>1</WinNumber> - <ItemText>flash_seqno</ItemText> - </Ww> - <Ww> - <count>49</count> - <WinNumber>1</WinNumber> - <ItemText>Get_anchor_appdata_num,0x0A</ItemText> - </Ww> - <Ww> - <count>50</count> - <WinNumber>1</WinNumber> - <ItemText>tagid_list[0]</ItemText> - </Ww> - <Ww> - <count>51</count> - <WinNumber>1</WinNumber> - <ItemText>taglist_num</ItemText> - </Ww> - <Ww> - <count>52</count> - <WinNumber>1</WinNumber> - <ItemText>tagdist_list,0x10</ItemText> - </Ww> - <Ww> - <count>53</count> - <WinNumber>1</WinNumber> - <ItemText>tagid_list,0x0A</ItemText> </Ww> </WatchWindow1> <WatchWindow2> @@ -486,8 +361,8 @@ <MemoryWindow1> <Mm> <WinNumber>1</WinNumber> - <SubType>0</SubType> - <ItemText>packet_data</ItemText> + <SubType>2</SubType> + <ItemText>0x40136c0</ItemText> <AccSizeX>0</AccSizeX> </Mm> </MemoryWindow1> @@ -505,7 +380,7 @@ <DebugFlag> <trace>0</trace> <periodic>1</periodic> - <aLwin>0</aLwin> + <aLwin>1</aLwin> <aCover>0</aCover> <aSer1>0</aSer1> <aSer2>0</aSer2> @@ -622,7 +497,7 @@ <Group> <GroupName>Driver</GroupName> - <tvExp>1</tvExp> + <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> <cbSel>0</cbSel> <RteFlg>0</RteFlg> @@ -950,17 +825,29 @@ <RteFlg>0</RteFlg> <bShared>0</bShared> </File> + <File> + <GroupNumber>3</GroupNumber> + <FileNumber>33</FileNumber> + <FileType>1</FileType> + <tvExp>0</tvExp> + <tvExpOptDlg>0</tvExpOptDlg> + <bDave2>0</bDave2> + <PathWithFileName>.\include\drivers\mk_pwm.c</PathWithFileName> + <FilenameWithoutPath>mk_pwm.c</FilenameWithoutPath> + <RteFlg>0</RteFlg> + <bShared>0</bShared> + </File> </Group> <Group> <GroupName>Main</GroupName> - <tvExp>0</tvExp> + <tvExp>1</tvExp> <tvExpOptDlg>0</tvExpOptDlg> <cbSel>0</cbSel> <RteFlg>0</RteFlg> <File> <GroupNumber>4</GroupNumber> - <FileNumber>33</FileNumber> + <FileNumber>34</FileNumber> <FileType>1</FileType> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> @@ -972,7 +859,7 @@ </File> <File> <GroupNumber>4</GroupNumber> - <FileNumber>34</FileNumber> + <FileNumber>35</FileNumber> <FileType>1</FileType> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> @@ -984,7 +871,7 @@ </File> <File> <GroupNumber>4</GroupNumber> - <FileNumber>35</FileNumber> + <FileNumber>36</FileNumber> <FileType>1</FileType> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> @@ -996,7 +883,7 @@ </File> <File> <GroupNumber>4</GroupNumber> - <FileNumber>36</FileNumber> + <FileNumber>37</FileNumber> <FileType>1</FileType> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> @@ -1008,25 +895,13 @@ </File> <File> <GroupNumber>4</GroupNumber> - <FileNumber>37</FileNumber> + <FileNumber>38</FileNumber> <FileType>1</FileType> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> <bDave2>0</bDave2> <PathWithFileName>.\dw_tag.c</PathWithFileName> <FilenameWithoutPath>dw_tag.c</FilenameWithoutPath> - <RteFlg>0</RteFlg> - <bShared>0</bShared> - </File> - <File> - <GroupNumber>4</GroupNumber> - <FileNumber>38</FileNumber> - <FileType>1</FileType> - <tvExp>0</tvExp> - <tvExpOptDlg>0</tvExpOptDlg> - <bDave2>0</bDave2> - <PathWithFileName>.\dw_app_anchor.c</PathWithFileName> - <FilenameWithoutPath>dw_app_anchor.c</FilenameWithoutPath> <RteFlg>0</RteFlg> <bShared>0</bShared> </File> @@ -1174,6 +1049,42 @@ <RteFlg>0</RteFlg> <bShared>0</bShared> </File> + <File> + <GroupNumber>4</GroupNumber> + <FileNumber>51</FileNumber> + <FileType>1</FileType> + <tvExp>0</tvExp> + <tvExpOptDlg>0</tvExpOptDlg> + <bDave2>0</bDave2> + <PathWithFileName>.\include\drivers\SC7A22H_driver.c</PathWithFileName> + <FilenameWithoutPath>SC7A22H_driver.c</FilenameWithoutPath> + <RteFlg>0</RteFlg> + <bShared>0</bShared> + </File> + <File> + <GroupNumber>4</GroupNumber> + <FileNumber>52</FileNumber> + <FileType>1</FileType> + <tvExp>0</tvExp> + <tvExpOptDlg>0</tvExpOptDlg> + <bDave2>0</bDave2> + <PathWithFileName>.\include\drivers\SC7A22H_example.c</PathWithFileName> + <FilenameWithoutPath>SC7A22H_example.c</FilenameWithoutPath> + <RteFlg>0</RteFlg> + <bShared>0</bShared> + </File> + <File> + <GroupNumber>4</GroupNumber> + <FileNumber>53</FileNumber> + <FileType>1</FileType> + <tvExp>0</tvExp> + <tvExpOptDlg>0</tvExpOptDlg> + <bDave2>0</bDave2> + <PathWithFileName>.\include\drivers\SC7A22H_port.c</PathWithFileName> + <FilenameWithoutPath>SC7A22H_port.c</FilenameWithoutPath> + <RteFlg>0</RteFlg> + <bShared>0</bShared> + </File> </Group> <Group> @@ -1184,7 +1095,7 @@ <RteFlg>0</RteFlg> <File> <GroupNumber>5</GroupNumber> - <FileNumber>51</FileNumber> + <FileNumber>54</FileNumber> <FileType>1</FileType> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> @@ -1196,7 +1107,7 @@ </File> <File> <GroupNumber>5</GroupNumber> - <FileNumber>52</FileNumber> + <FileNumber>55</FileNumber> <FileType>1</FileType> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> @@ -1208,7 +1119,7 @@ </File> <File> <GroupNumber>5</GroupNumber> - <FileNumber>53</FileNumber> + <FileNumber>56</FileNumber> <FileType>1</FileType> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> @@ -1220,7 +1131,7 @@ </File> <File> <GroupNumber>5</GroupNumber> - <FileNumber>54</FileNumber> + <FileNumber>57</FileNumber> <FileType>1</FileType> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> @@ -1232,7 +1143,7 @@ </File> <File> <GroupNumber>5</GroupNumber> - <FileNumber>55</FileNumber> + <FileNumber>58</FileNumber> <FileType>1</FileType> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> @@ -1244,7 +1155,7 @@ </File> <File> <GroupNumber>5</GroupNumber> - <FileNumber>56</FileNumber> + <FileNumber>59</FileNumber> <FileType>1</FileType> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> @@ -1256,7 +1167,7 @@ </File> <File> <GroupNumber>5</GroupNumber> - <FileNumber>57</FileNumber> + <FileNumber>60</FileNumber> <FileType>1</FileType> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> @@ -1268,7 +1179,7 @@ </File> <File> <GroupNumber>5</GroupNumber> - <FileNumber>58</FileNumber> + <FileNumber>61</FileNumber> <FileType>1</FileType> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> @@ -1280,7 +1191,7 @@ </File> <File> <GroupNumber>5</GroupNumber> - <FileNumber>59</FileNumber> + <FileNumber>62</FileNumber> <FileType>1</FileType> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> @@ -1292,7 +1203,7 @@ </File> <File> <GroupNumber>5</GroupNumber> - <FileNumber>60</FileNumber> + <FileNumber>63</FileNumber> <FileType>1</FileType> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> @@ -1312,7 +1223,7 @@ <RteFlg>0</RteFlg> <File> <GroupNumber>6</GroupNumber> - <FileNumber>61</FileNumber> + <FileNumber>64</FileNumber> <FileType>1</FileType> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> @@ -1324,7 +1235,7 @@ </File> <File> <GroupNumber>6</GroupNumber> - <FileNumber>62</FileNumber> + <FileNumber>65</FileNumber> <FileType>1</FileType> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> @@ -1336,7 +1247,7 @@ </File> <File> <GroupNumber>6</GroupNumber> - <FileNumber>63</FileNumber> + <FileNumber>66</FileNumber> <FileType>1</FileType> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> @@ -1358,13 +1269,13 @@ <Group> <GroupName>Utility</GroupName> - <tvExp>0</tvExp> + <tvExp>1</tvExp> <tvExpOptDlg>0</tvExpOptDlg> <cbSel>0</cbSel> <RteFlg>0</RteFlg> <File> <GroupNumber>8</GroupNumber> - <FileNumber>64</FileNumber> + <FileNumber>67</FileNumber> <FileType>1</FileType> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> @@ -1376,7 +1287,7 @@ </File> <File> <GroupNumber>8</GroupNumber> - <FileNumber>65</FileNumber> + <FileNumber>68</FileNumber> <FileType>1</FileType> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> @@ -1390,13 +1301,13 @@ <Group> <GroupName>HidoLib</GroupName> - <tvExp>0</tvExp> + <tvExp>1</tvExp> <tvExpOptDlg>0</tvExpOptDlg> <cbSel>0</cbSel> <RteFlg>0</RteFlg> <File> <GroupNumber>9</GroupNumber> - <FileNumber>66</FileNumber> + <FileNumber>69</FileNumber> <FileType>4</FileType> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> @@ -1410,13 +1321,13 @@ <Group> <GroupName>Internet</GroupName> - <tvExp>0</tvExp> + <tvExp>1</tvExp> <tvExpOptDlg>0</tvExpOptDlg> <cbSel>0</cbSel> <RteFlg>0</RteFlg> <File> <GroupNumber>10</GroupNumber> - <FileNumber>67</FileNumber> + <FileNumber>70</FileNumber> <FileType>1</FileType> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> @@ -1428,7 +1339,7 @@ </File> <File> <GroupNumber>10</GroupNumber> - <FileNumber>68</FileNumber> + <FileNumber>71</FileNumber> <FileType>1</FileType> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> @@ -1440,7 +1351,7 @@ </File> <File> <GroupNumber>10</GroupNumber> - <FileNumber>69</FileNumber> + <FileNumber>72</FileNumber> <FileType>1</FileType> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> @@ -1452,7 +1363,7 @@ </File> <File> <GroupNumber>10</GroupNumber> - <FileNumber>70</FileNumber> + <FileNumber>73</FileNumber> <FileType>1</FileType> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> @@ -1464,7 +1375,7 @@ </File> <File> <GroupNumber>10</GroupNumber> - <FileNumber>71</FileNumber> + <FileNumber>74</FileNumber> <FileType>1</FileType> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> @@ -1476,7 +1387,7 @@ </File> <File> <GroupNumber>10</GroupNumber> - <FileNumber>72</FileNumber> + <FileNumber>75</FileNumber> <FileType>1</FileType> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> @@ -1488,7 +1399,7 @@ </File> <File> <GroupNumber>10</GroupNumber> - <FileNumber>73</FileNumber> + <FileNumber>76</FileNumber> <FileType>1</FileType> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> @@ -1502,13 +1413,13 @@ <Group> <GroupName>Hal</GroupName> - <tvExp>0</tvExp> + <tvExp>1</tvExp> <tvExpOptDlg>0</tvExpOptDlg> <cbSel>0</cbSel> <RteFlg>0</RteFlg> <File> <GroupNumber>11</GroupNumber> - <FileNumber>74</FileNumber> + <FileNumber>77</FileNumber> <FileType>1</FileType> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> -- Gitblit v1.9.3