|
樓主 |
發表於 2015年4月10日 02:30 AM
|
顯示全部樓層
從沒看過這個錯誤訊息,幫你看了一下Pixhawk原始碼.
代碼19是ERROR_SUBSYSTEM_CPU,用來偵測迴圈死機用的(死機會寫出19-1).
而19-0是表示由意外中恢復的意思.
所以可能前一次Arm馬達開始轉,幾秒後就突然被Pixhawk Disarm,於是大大又再次Arm讓馬達轉,而留下這個訊息在log中.
說簡單一點...就是CPU跑的異常緩慢,不知被什麼東東把資源吃掉了,不排除是有BUG!
uint32_t tnow = hal.scheduler->micros();
if (mainLoop_count != failsafe_last_mainLoop_count) {
// the main loop is running, all is OK
failsafe_last_mainLoop_count = mainLoop_count;
failsafe_last_timestamp = tnow;
if (in_failsafe) {
in_failsafe = false;
Log_Write_Error(ERROR_SUBSYSTEM_CPU,ERROR_CODE_FAILSAFE_RESOLVED);//會寫出19-0
}
return;
}
if (!in_failsafe && failsafe_enabled && tnow - failsafe_last_timestamp > 2000000) {
// motors are running but we have gone 2 second since the
// main loop ran. That means we're in trouble and should
// disarm the motors.
in_failsafe = true;
// reduce motors to minimum (we do not immediately disarm because we want to log the failure)
if (motors.armed()) {
motors.output_min();
}
// log an error
Log_Write_Error(ERROR_SUBSYSTEM_CPU,ERROR_CODE_FAILSAFE_OCCURRED);//會寫出19-1
}
|
|