From 0fca670f85d055db901143914079dff7ee6096f6 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Thu, 8 Feb 2024 15:22:21 +0900 Subject: [PATCH] Mount: Siyi waits for non-zero cam firmware version --- libraries/AP_Mount/AP_Mount_Siyi.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libraries/AP_Mount/AP_Mount_Siyi.cpp b/libraries/AP_Mount/AP_Mount_Siyi.cpp index 2925e5b70e..c33fb3ec94 100644 --- a/libraries/AP_Mount/AP_Mount_Siyi.cpp +++ b/libraries/AP_Mount/AP_Mount_Siyi.cpp @@ -353,11 +353,16 @@ void AP_Mount_Siyi::process_packet() _fw_version.camera.major = _msg_buff[_msg_buff_data_start+2]; // firmware major version _fw_version.camera.minor = _msg_buff[_msg_buff_data_start+1]; // firmware minor version _fw_version.camera.patch = _msg_buff[_msg_buff_data_start+0]; // firmware revision (aka patch) - + _fw_version.gimbal.major = _msg_buff[_msg_buff_data_start+6]; // firmware major version _fw_version.gimbal.minor = _msg_buff[_msg_buff_data_start+5]; // firmware minor version _fw_version.gimbal.patch = _msg_buff[_msg_buff_data_start+4]; // firmware revision (aka patch) - + + // camera firmware version may be all zero soon after startup. giveup and try again later + if (_fw_version.camera.major == 0 && _fw_version.camera.minor == 0 && _fw_version.camera.patch == 0) { + break; + } + _fw_version.received = true; // display camera info to user