diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml
index cddd77d..68ccc9d 100644
--- a/.settings/language.settings.xml
+++ b/.settings/language.settings.xml
@@ -5,7 +5,7 @@
-
+
@@ -16,7 +16,7 @@
-
+
diff --git a/a8000_protocol b/a8000_protocol
index 62762ee..256fe59 160000
--- a/a8000_protocol
+++ b/a8000_protocol
@@ -1 +1 @@
-Subproject commit 62762eee6e2c0cda5971dffe58d68bc10a5207cb
+Subproject commit 256fe59bfa94c74048a27af152a76d4ffa649578
diff --git a/sdk b/sdk
index b316b30..e22be7d 160000
--- a/sdk
+++ b/sdk
@@ -1 +1 @@
-Subproject commit b316b30462b063f2ec6dbfb8a1b342c935d840cb
+Subproject commit e22be7dd51ddd673d8e4cb67700b62dce5afd548
diff --git a/usrc/subboards/subboard40_and_50_temperature_ctrl/pri_board.h b/usrc/subboards/subboard40_and_50_temperature_ctrl/pri_board.h
index 3093896..a2382a9 100644
--- a/usrc/subboards/subboard40_and_50_temperature_ctrl/pri_board.h
+++ b/usrc/subboards/subboard40_and_50_temperature_ctrl/pri_board.h
@@ -12,7 +12,7 @@
#define EXT_INPUT_IO0 PC6, ZGPIO::kMode_nopull, ZGPIO::kIRQ_noIrq, true
#define EXT_INPUT_IO1 PC7, ZGPIO::kMode_nopull, ZGPIO::kIRQ_noIrq, true
-#define EXT_INPUT_IO2 PA0, ZGPIO::kMode_nopull, ZGPIO::kIRQ_noIrq, true
+#define EXT_INPUT_IO2 PA0, ZGPIO::kMode_nopull, ZGPIO::kIRQ_noIrq, false
#define EXT_INPUT_IO3 PinNull, ZGPIO::kMode_nopull, ZGPIO::kIRQ_noIrq, true
#define EXT_INPUT_IO4 PinNull, ZGPIO::kMode_nopull, ZGPIO::kIRQ_noIrq, true
#define EXT_INPUT_IO5 PinNull, ZGPIO::kMode_nopull, ZGPIO::kIRQ_noIrq, true
@@ -21,7 +21,7 @@
#define EXT_INPUT_IO8 PinNull, ZGPIO::kMode_nopull, ZGPIO::kIRQ_noIrq, true
#define EXT_INPUT_IO9 PinNull, ZGPIO::kMode_nopull, ZGPIO::kIRQ_noIrq, true
-#define EXT_OUTPUT_IO0 PD0, ZGPIO::kMode_nopull, false /*mirror*/, true /*init val*/
+#define EXT_OUTPUT_IO0 PD0, ZGPIO::kMode_nopull, true /*mirror*/ , true/*init val*/
#define EXT_OUTPUT_IO1 PinNull, ZGPIO::kMode_nopull, false /*mirror*/, true /*init val*/
#define EXT_OUTPUT_IO2 PinNull, ZGPIO::kMode_nopull, false /*mirror*/, true /*init val*/
#define EXT_OUTPUT_IO3 PinNull, ZGPIO::kMode_nopull, false /*mirror*/, true /*init val*/
diff --git a/usrc/subboards/subboard40_and_50_temperature_ctrl/zcan_fan_ctrl_module.cpp b/usrc/subboards/subboard40_and_50_temperature_ctrl/zcan_fan_ctrl_module.cpp
index b9f52e1..27c1acf 100644
--- a/usrc/subboards/subboard40_and_50_temperature_ctrl/zcan_fan_ctrl_module.cpp
+++ b/usrc/subboards/subboard40_and_50_temperature_ctrl/zcan_fan_ctrl_module.cpp
@@ -10,13 +10,13 @@ void ZcanFanCtrlModule::initialize(int32_t id, ZIPWMFanCtrlModule* fanmodule, in
OSDefaultSchduler::getInstance()->regPeriodJob(
[this](OSDefaultSchduler::Context& context) { //
- if (creg.m_module_status == 1) {
+ if (creg.module_status == 1) {
if (m_fanmodule->isError()) {
ZLOGE(TAG, "detect fan error,stop fan");
creg.module_errorcode = err::kfan_hardware_fault;
m_fanmodule->clearError();
m_fanmodule->stop();
- creg.m_module_status = 2;
+ creg.module_status = 2;
}
}
},
@@ -39,7 +39,7 @@ int32_t ZcanFanCtrlModule::module_xxx_reg(int32_t param_id, bool read, int32_t&
int32_t ZcanFanCtrlModule::module_stop() { return fan_controler_set_speed(0); }
int32_t ZcanFanCtrlModule::fan_controler_set_speed(int32_t fanspeed100) {
- if (creg.m_module_status == 2) {
+ if (creg.module_status == 2) {
ZLOGE(TAG, "fan error trigger, do nothing");
if (fanspeed100 == 0) {
return 0;
@@ -51,10 +51,10 @@ int32_t ZcanFanCtrlModule::fan_controler_set_speed(int32_t fanspeed100) {
if (m_now_speed == 0) {
m_fanmodule->stop();
- creg.m_module_status = 0;
+ creg.module_status = 0;
} else {
m_fanmodule->setFanSpeed(m_now_speed);
- creg.m_module_status = 1;
+ creg.module_status = 1;
creg.module_errorcode = 0;
}
diff --git a/usrc/subboards/subboard90_optical_module/optical_module.cpp b/usrc/subboards/subboard90_optical_module/optical_module.cpp
index 936500d..182072b 100644
--- a/usrc/subboards/subboard90_optical_module/optical_module.cpp
+++ b/usrc/subboards/subboard90_optical_module/optical_module.cpp
@@ -228,14 +228,14 @@ int32_t OpticalModule::module_xxx_reg(int32_t param_id, bool read, int32_t& val)
PROCESS_REG(kreg_boditech_optical_scan_step_interval, REG_GET(m_reg.scan_step_interval), REG_SET(m_reg.scan_step_interval));
PROCESS_REG(kreg_boditech_optical_scan_pointnum, REG_GET(m_reg.scan_pointnum), REG_SET(m_reg.scan_pointnum));
PROCESS_REG(kreg_boditech_optical_channel_select_num, REG_GET(m_reg.channel_select_num), REG_SET(m_reg.channel_select_num));
- PROCESS_REG(kreg_boditech_optical_laster_gain, REG_GET(m_reg.laster_gain), REG_SET(m_reg.laster_gain));
- PROCESS_REG(kreg_boditech_optical_scan_gain, REG_GET(m_reg.scan_gain), REG_SET(m_reg.scan_gain));
+ PROCESS_REG(kreg_boditech_optical_laster_gain_potentiometer_val, REG_GET(m_reg.laster_gain), REG_SET(m_reg.laster_gain));
+ PROCESS_REG(kreg_boditech_optical_scan_gain_potentiometer, REG_GET(m_reg.scan_gain), REG_SET(m_reg.scan_gain));
PROCESS_REG(kreg_boditech_optical_trf_uvled_on_duration_us, REG_GET(m_reg.trf_uvled_on_duration_us), REG_SET(m_reg.trf_uvled_on_duration_us));
PROCESS_REG(kreg_boditech_optical_trf_uvled_off_duration_us, REG_GET(m_reg.trf_uvled_off_duration_us), REG_SET(m_reg.trf_uvled_off_duration_us));
PROCESS_REG(kreg_boditech_optical_trf_scan_delay_us, REG_GET(m_reg.trf_scan_delay_us), REG_SET(m_reg.trf_scan_delay_us));
PROCESS_REG(kreg_boditech_optical_trf_scan_duration_us, REG_GET(m_reg.trf_scan_duration_us), REG_SET(m_reg.trf_scan_duration_us));
- PROCESS_REG(kreg_boditech_optical_scan_gain_adjust_suggestion, REG_GET(m_reg.scan_gain_adjust_suggestion), ACTION_NONE);
+ PROCESS_REG(kreg_boditech_optical_scan_gain_potentiometer_adjust_suggestion, REG_GET(m_reg.scan_gain_adjust_suggestion), ACTION_NONE);
PROCESS_REG(kreg_boditech_optical_adc_result_overflow, REG_GET(m_reg.adc_result_overflow), ACTION_NONE);
PROCESS_REG(kreg_boditech_optical_laster_intensity, REG_GET(m_reg.laster_intensity), ACTION_NONE);
default:
diff --git a/utils/.gitignore b/utils/.gitignore
new file mode 100644
index 0000000..128fe13
--- /dev/null
+++ b/utils/.gitignore
@@ -0,0 +1 @@
+potentiometer_and_gain_convert.exe
\ No newline at end of file
diff --git a/utils/README.md b/utils/README.md
new file mode 100644
index 0000000..e69de29
diff --git a/utils/build.bat b/utils/build.bat
new file mode 100644
index 0000000..9de3bee
--- /dev/null
+++ b/utils/build.bat
@@ -0,0 +1,3 @@
+g++ -static -static-libgcc -static-libstdc++ -lwsock32 -lstdc++ ^
+ .\potentiometer_and_gain_convert.cpp -o potentiometer_and_gain_convert.exe
+
diff --git a/utils/f_potentiometer_val_and_gain.csv b/utils/f_potentiometer_val_and_gain.csv
new file mode 100644
index 0000000..9496182
--- /dev/null
+++ b/utils/f_potentiometer_val_and_gain.csv
@@ -0,0 +1,255 @@
+potentiometer_val ,gain
+1 ,1.24
+2 ,1.42
+3 ,1.60
+4 ,1.78
+5 ,1.97
+6 ,2.15
+7 ,2.33
+8 ,2.51
+9 ,2.69
+10 ,2.88
+11 ,3.06
+12 ,3.24
+13 ,3.42
+14 ,3.60
+15 ,3.78
+16 ,3.97
+17 ,4.15
+18 ,4.33
+19 ,4.51
+20 ,4.69
+21 ,4.87
+22 ,5.06
+23 ,5.24
+24 ,5.42
+25 ,5.60
+26 ,5.78
+27 ,5.96
+28 ,6.15
+29 ,6.33
+30 ,6.51
+31 ,6.69
+32 ,6.87
+33 ,7.05
+34 ,7.24
+35 ,7.42
+36 ,7.60
+37 ,7.78
+38 ,7.96
+39 ,8.14
+40 ,8.33
+41 ,8.51
+42 ,8.69
+43 ,8.87
+44 ,9.05
+45 ,9.23
+46 ,9.42
+47 ,9.60
+48 ,9.78
+49 ,9.96
+50 ,10.14
+51 ,10.32
+52 ,10.51
+53 ,10.69
+54 ,10.87
+55 ,11.05
+56 ,11.23
+57 ,11.41
+58 ,11.60
+59 ,11.78
+60 ,11.96
+61 ,12.14
+62 ,12.32
+63 ,12.50
+64 ,12.69
+65 ,12.87
+66 ,13.05
+67 ,13.23
+68 ,13.41
+69 ,13.59
+70 ,13.78
+71 ,13.96
+72 ,14.14
+73 ,14.32
+74 ,14.50
+75 ,14.68
+76 ,14.87
+77 ,15.05
+78 ,15.23
+79 ,15.41
+80 ,15.59
+81 ,15.77
+82 ,15.96
+83 ,16.14
+84 ,16.32
+85 ,16.50
+86 ,16.68
+87 ,16.86
+88 ,17.05
+89 ,17.23
+90 ,17.41
+91 ,17.59
+92 ,17.77
+93 ,17.95
+94 ,18.14
+95 ,18.32
+96 ,18.50
+97 ,18.68
+98 ,18.86
+99 ,19.05
+100 ,19.23
+101 ,19.41
+102 ,19.59
+103 ,19.77
+104 ,19.95
+105 ,20.14
+106 ,20.32
+107 ,20.50
+108 ,20.68
+109 ,20.86
+110 ,21.04
+111 ,21.23
+112 ,21.41
+113 ,21.59
+114 ,21.77
+115 ,21.95
+116 ,22.13
+117 ,22.32
+118 ,22.50
+119 ,22.68
+120 ,22.86
+121 ,23.04
+122 ,23.22
+123 ,23.41
+124 ,23.59
+125 ,23.77
+126 ,23.95
+127 ,24.13
+128 ,24.31
+129 ,24.50
+130 ,24.68
+131 ,24.86
+132 ,25.04
+133 ,25.22
+134 ,25.40
+135 ,25.59
+136 ,25.77
+137 ,25.95
+138 ,26.13
+139 ,26.31
+140 ,26.49
+141 ,26.68
+142 ,26.86
+143 ,27.04
+144 ,27.22
+145 ,27.40
+146 ,27.58
+147 ,27.77
+148 ,27.95
+149 ,28.13
+150 ,28.31
+151 ,28.49
+152 ,28.67
+153 ,28.86
+154 ,29.04
+155 ,29.22
+156 ,29.40
+157 ,29.58
+158 ,29.76
+159 ,29.95
+160 ,30.13
+161 ,30.31
+162 ,30.49
+163 ,30.67
+164 ,30.85
+165 ,31.04
+166 ,31.22
+167 ,31.40
+168 ,31.58
+169 ,31.76
+170 ,31.94
+171 ,32.13
+172 ,32.31
+173 ,32.49
+174 ,32.67
+175 ,32.85
+176 ,33.03
+177 ,33.22
+178 ,33.40
+179 ,33.58
+180 ,33.76
+181 ,33.94
+182 ,34.12
+183 ,34.31
+184 ,34.49
+185 ,34.67
+186 ,34.85
+187 ,35.03
+188 ,35.22
+189 ,35.40
+190 ,35.58
+191 ,35.76
+192 ,35.94
+193 ,36.12
+194 ,36.31
+195 ,36.49
+196 ,36.67
+197 ,36.85
+198 ,37.03
+199 ,37.21
+200 ,37.40
+201 ,37.58
+202 ,37.76
+203 ,37.94
+204 ,38.12
+205 ,38.30
+206 ,38.49
+207 ,38.67
+208 ,38.85
+209 ,39.03
+210 ,39.21
+211 ,39.39
+212 ,39.58
+213 ,39.76
+214 ,39.94
+215 ,40.12
+216 ,40.30
+217 ,40.48
+218 ,40.67
+219 ,40.85
+220 ,41.03
+221 ,41.21
+222 ,41.39
+223 ,41.57
+224 ,41.76
+225 ,41.94
+226 ,42.12
+227 ,42.30
+228 ,42.48
+229 ,42.66
+230 ,42.85
+231 ,43.03
+232 ,43.21
+233 ,43.39
+234 ,43.57
+235 ,43.75
+236 ,43.94
+237 ,44.12
+238 ,44.30
+239 ,44.48
+240 ,44.66
+241 ,44.84
+242 ,45.03
+243 ,45.21
+244 ,45.39
+245 ,45.57
+246 ,45.75
+247 ,45.93
+248 ,46.12
+249 ,46.30
+250 ,46.48
+251 ,46.66
+252 ,46.84
+253 ,47.02
+254 ,47.21
\ No newline at end of file
diff --git a/utils/potentiometer_and_gain_convert.cpp b/utils/potentiometer_and_gain_convert.cpp
new file mode 100644
index 0000000..78ac8f9
--- /dev/null
+++ b/utils/potentiometer_and_gain_convert.cpp
@@ -0,0 +1,63 @@
+#include
+
+#include
+#include
+#include
+#include
+#include