|
|
@ -264,14 +264,14 @@ void AP_BattMonitor_Serial_BattGo::read() |
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
if(tnow-last_rev_batt_time>5000000 && tnow - last_prt > 20000000 ){ |
|
|
|
if(tnow-last_rev_batt_time>5000000 && tnow - last_prt > 20000000 ){ |
|
|
|
_interim_state.healthy = false; |
|
|
|
_interim_state.healthy = false; |
|
|
|
gcs().send_text(MAV_SEVERITY_INFO,"BATT_ERR:已经%d秒没有接收到智能电池 的串口数据!",(tnow-last_rev_batt_time)/1000000); |
|
|
|
gcs().send_text(MAV_SEVERITY_WARNING,"BATT_ERR:已经%d秒没有接收到智能电池的串口数据!",(tnow-last_rev_batt_time)/1000000); |
|
|
|
last_prt = tnow; |
|
|
|
last_prt = tnow; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
if(tnow-last_rev_batt_time>5000000 && tnow - last_prt > 20000000 ){ |
|
|
|
if(tnow-last_rev_batt_time>5000000 && tnow - last_prt > 20000000 ){ |
|
|
|
_interim_state.healthy = false; |
|
|
|
_interim_state.healthy = false; |
|
|
|
gcs().send_text(MAV_SEVERITY_INFO,"BATT_ERR:已经%d秒没有接收到智能电池 的串口数据!",(tnow-last_rev_batt_time)/1000000); |
|
|
|
gcs().send_text(MAV_SEVERITY_WARNING,"BATT_ERR:已经%d秒没有接收到智能电池的串口数据!",(tnow-last_rev_batt_time)/1000000); |
|
|
|
last_prt = tnow; |
|
|
|
last_prt = tnow; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|