修改exchecker相关

This commit is contained in:
ranchuan
2023-12-14 18:57:04 +08:00
parent 3909bc13a2
commit d51cef720f
3 changed files with 34 additions and 9 deletions

View File

@@ -311,3 +311,17 @@ array_def *protm_encode(protu_def *p,array_def *data)
protuc_codec_export(ym_slave,protm_decode,protm_encode);
// 小板ew协议解码
array_def *protew_decode(protu_def *p,array_def *data)
{
}
array_def *protew_encode(protu_def *p,array_def *data)
{
}
protuc_codec_export(ew_slave,protm_decode,protm_encode);

View File

@@ -63,3 +63,10 @@ void Ye_RunPlanCheckTest(void)

View File

@@ -28,6 +28,7 @@ uint8_t EW_RunBuf[EW_CHECKER_RUN_BUF];
@param0 总线电压
@param1 超时时间 0.1ms
@param2 充电结束时的AD值
@rtv0 返回总线电压
@rtv1 返回总线电流低于设置AD值的时间
*/
void EW_Test_PowerOn()
@@ -73,8 +74,8 @@ void EW_Test_SetBusV(void)
us_m_v = ((us_h_v/80)+2)*60;
delay_ms(us_m_v);
us_h_v = Power_GetBousV();
Checker_SetRtv(&us_h_v,cfg->rtv_count);
}
Checker_SetRtv(&us_h_v,cfg->rtv_count);
Checker_MaskResult(uc_rtv,cfg->task_info.runindex);
}
@@ -106,6 +107,7 @@ void EW_Test_EnMTP(void)
{
uint8_t uc_ack = 0;
uc_ack = EW_EnWriteMTP(checker_runcfg.netid,checker_runcfg.params[0]);
delay_ms(5);
Checker_MaskResult(uc_ack,checker_runcfg.task_info.runindex);
}
@@ -244,29 +246,29 @@ void EW_Test_CheckRunCfg()
}
if(run_cfg.runcfg_st.vbus_rx_sg != checker_runcfg.params[1])
{
uc_rtv |= 0x01;
uc_rtv |= 0x02;
}
if(run_cfg.runcfg_st.vbus_mode != checker_runcfg.params[2])
{
uc_rtv |= 0x01;
uc_rtv |= 0x04;
}
if(run_cfg.runcfg_st.reset_run_step != checker_runcfg.params[3])
{
uc_rtv |= 0x01;
uc_rtv |= 0x08;
}
checker_runcfg.uid_len = checker_runcfg.params[4];
if((checker_runcfg.params[4] <7 ) || (run_cfg.runcfg_st.uid_len != (checker_runcfg.params[4])-7))
{
uc_rtv |= 0x01;
uc_rtv |= 0x10;
}
checker_runcfg.pwd_len = checker_runcfg.params[5];
if((checker_runcfg.params[5] < 4) ||(run_cfg.runcfg_st.pwd_len != (checker_runcfg.params[5] - 4)))
{
uc_rtv |= 0x01;
uc_rtv |= 0x20;
}
if(run_cfg.runcfg_st.version != checker_runcfg.params[6])
{
uc_rtv |= 0x01;
uc_rtv |= 0x40;
}
memcpy(aus_temp,run_cfg.run_cfg_buf,4);
Checker_MaskResult(uc_rtv,checker_runcfg.task_info.runindex);
@@ -458,9 +460,10 @@ void EW_Test_CheckeState(void)
if(uc_rtv > 0 || ((state.us_data[0] & checker_runcfg.params[0] )!= checker_runcfg.params[1]))
{
Checker_MaskResult(1,checker_runcfg.task_info.runindex);
Checker_SetRtv((uint16_t*)state.us_data,checker_runcfg.rtv_count);
return;
}
Checker_MaskResult(1,checker_runcfg.task_info.runindex);
Checker_MaskResult(0,checker_runcfg.task_info.runindex);
Checker_SetRtv((uint16_t*)state.us_data,checker_runcfg.rtv_count);
}
@@ -605,7 +608,7 @@ void EW_Test_ClkAmend()
uint8_t uc_rtv = 0;
uint32_t ul_temp = 0;
uc_rtv = EW_ClkAmend(checker_runcfg.netid,checker_runcfg.params[0],checker_runcfg.params[1]);
delay_os_ms(100);
delay_os_ms(1000);
uc_rtv |= EW_ReadClkAmend(checker_runcfg.netid,&ul_temp);
ul_temp >>= 2;
Checker_SetRtv((uint16_t*)&ul_temp,checker_runcfg.rtv_count);
@@ -627,6 +630,7 @@ void EW_Test_SetAddr(void)
if(checker_runcfg.params[1] == 0)
{
Checker_MaskResult(uc_rtv,checker_runcfg.task_info.runindex);
Checker_SetRtv(&us_temp,checker_runcfg.rtv_count);
return;
}
if(checker_runcfg.params[1] == 1)