mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 20:28:37 +08:00
commander: add support for Aerotenna OcPoC-Zynq hardware
This commit is contained in:
committed by
Lorenz Meier
parent
a236bd1015
commit
dbbe3c0863
@@ -571,6 +571,9 @@ bool preflightCheck(orb_advert_t *mavlink_log_pub, bool checkMag, bool checkAcc,
|
|||||||
#elif defined(__PX4_POSIX_BEBOP)
|
#elif defined(__PX4_POSIX_BEBOP)
|
||||||
PX4_WARN("Preflight checks always pass on Bebop.");
|
PX4_WARN("Preflight checks always pass on Bebop.");
|
||||||
return true;
|
return true;
|
||||||
|
#elif defined(__PX4_POSIX_OCPOC)
|
||||||
|
PX4_WARN("Preflight checks always pass on OcPoC.");
|
||||||
|
return true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool failed = false;
|
bool failed = false;
|
||||||
|
|||||||
@@ -78,6 +78,31 @@ int do_esc_calibration(orb_advert_t *mavlink_log_pub, struct actuator_armed_s* a
|
|||||||
{
|
{
|
||||||
int return_code = PX4_OK;
|
int return_code = PX4_OK;
|
||||||
|
|
||||||
|
#if defined(__PX4_POSIX_OCPOC)
|
||||||
|
hrt_abstime timeout_start;
|
||||||
|
hrt_abstime timeout_wait = 60*1000*1000;
|
||||||
|
armed->in_esc_calibration_mode = true;
|
||||||
|
calibration_log_info(mavlink_log_pub, CAL_QGC_DONE_MSG, "begin esc");
|
||||||
|
timeout_start = hrt_absolute_time();
|
||||||
|
|
||||||
|
while (true) {
|
||||||
|
if (hrt_absolute_time() - timeout_start > timeout_wait) {
|
||||||
|
break;
|
||||||
|
}else{
|
||||||
|
usleep(50000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
armed->in_esc_calibration_mode = false;
|
||||||
|
calibration_log_info(mavlink_log_pub, CAL_QGC_DONE_MSG, "end esc");
|
||||||
|
|
||||||
|
if (return_code == OK) {
|
||||||
|
calibration_log_info(mavlink_log_pub, CAL_QGC_DONE_MSG, "esc");
|
||||||
|
}
|
||||||
|
|
||||||
|
return return_code;
|
||||||
|
|
||||||
|
#else
|
||||||
int fd = -1;
|
int fd = -1;
|
||||||
|
|
||||||
struct battery_status_s battery;
|
struct battery_status_s battery;
|
||||||
@@ -192,4 +217,5 @@ Out:
|
|||||||
Error:
|
Error:
|
||||||
return_code = PX4_ERROR;
|
return_code = PX4_ERROR;
|
||||||
goto Out;
|
goto Out;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user