diff --git a/checher_slave.uvoptx b/checher_slave.uvoptx
index 8a9c3ec..f518321 100644
--- a/checher_slave.uvoptx
+++ b/checher_slave.uvoptx
@@ -299,7 +299,7 @@
1
0
- 0
+ 1
18
@@ -529,7 +529,7 @@
1
0
- 1
+ 0
18
diff --git a/source/ReadMe.txt b/source/ReadMe.txt
index 3a23b50..c22658e 100644
--- a/source/ReadMe.txt
+++ b/source/ReadMe.txt
@@ -216,4 +216,6 @@
解决自动更新bootloader死机的问题
软件版本2.00
解决检测任务中重试失败后不会填充返回值的bug
+2023.10.17
+ mystring.c 添加字符串转浮点函数
diff --git a/source/elec_det/elec_det.c b/source/elec_det/elec_det.c
index ddc92fd..c0cf754 100644
--- a/source/elec_det/elec_det.c
+++ b/source/elec_det/elec_det.c
@@ -5,6 +5,7 @@
#include "debug.h"
#include "stdlib.h"
#include "dev_flash.h"
+#include "compiler_info.h"
#include "elec_det.h"
#include "base/delay.h"
@@ -138,7 +139,7 @@ array_def *elec_bootinfo(void)
Ye_BoardCheck();
board_st.hard_v=sys_param()->hard_version;
board_st.resistor_diff=sys_param()->resistor_diff;
- board_st.hard_v=19;
+ board_st.soft_v=(int)(str_atof(SOFT_VERSION)*100);
array_def *r=arr_creat();
arr_append(r,0);
arr_appends(r,&board_st,sizeof(BoartCheck_st));
@@ -404,13 +405,11 @@ array_def *elec_check_with_scheme(array_def *uid_psw)
checker_runcfg.excue_rtv=1;
task_fun();
Checker_Excueindex(task_index);
+ checker_runcfg.rtv_index-=checker_runcfg.rtv_count;
if(checker_runcfg.excue_rtv==0)
break;
- checker_runcfg.rtv_index-=checker_runcfg.rtv_count;
- }
- if(checker_runcfg.excue_rtv){
- checker_runcfg.rtv_index+=checker_runcfg.rtv_count;
}
+ checker_runcfg.rtv_index+=checker_runcfg.rtv_count;
DBG_LOG("task_index:%d,taskid:%d,ret=%d,rtv_index=%d.",task_index,taskid,checker_runcfg.excue_rtv,
checker_runcfg.rtv_index);
diff --git a/source/main/compiler_info.h b/source/main/compiler_info.h
index 1f7d8c8..0c5c5e8 100644
--- a/source/main/compiler_info.h
+++ b/source/main/compiler_info.h
@@ -6,8 +6,8 @@
-#define BUILD_DATE "2023-10-16 18:50:56"
-#define SOFT_VERSION "2.00"
+#define BUILD_DATE "2023-10-17 09:42:57"
+#define SOFT_VERSION "2.01"
diff --git a/source/main/main.c b/source/main/main.c
index 09a85d9..6d1b1b4 100644
--- a/source/main/main.c
+++ b/source/main/main.c
@@ -90,8 +90,8 @@ static int test(list_def *argv)
cmd_print("param num too less.");
return -1;
}
- int num=str_atoi(list_get_str(argv,1));
- cmd_print("test num=%d,hex=%x",num,num);
+ float num=str_atof(list_get_str(argv,1));
+ cmd_print("test num=%f",num);
return 0;
}
//commend_export(test,test,"cmd test")
diff --git a/source/prebuild.py b/source/prebuild.py
index 1023078..2c9024a 100644
--- a/source/prebuild.py
+++ b/source/prebuild.py
@@ -7,7 +7,7 @@ import mycopy
# 定义软件版本号
-SOFT_VERION = "2.00"
+SOFT_VERION = "2.01"
diff --git a/source/soft/mystring.c b/source/soft/mystring.c
index 108bad5..4ce0dde 100644
--- a/source/soft/mystring.c
+++ b/source/soft/mystring.c
@@ -132,7 +132,7 @@ static int str_ainttoi(const char *s)
ret*=10;
ret+=*s-'0';
}
- else return ret;
+ else return ret*sig;
s++;
}
return ret*sig;
@@ -226,6 +226,52 @@ list_def *str_atod_list(const char *s, char c)
+/*
+*
+* 计算整数乘方
+*
+*/
+float str_exp(int a,int b)
+{
+ int n=1;
+ for(int i=0;i