Changes to allow the commander module to be built and run on Qurt (#21186)

* Changed exclusion to rely on the definition of PX4_STORAGEDIR
This commit is contained in:
Eric Katzfey
2023-03-06 06:49:07 -08:00
committed by GitHub
parent dc4926dc4d
commit daa302cdbe
9 changed files with 22 additions and 10 deletions
+4 -2
View File
@@ -231,8 +231,10 @@ private:
hrt_abstime _last_disarmed_timestamp{0};
hrt_abstime _overload_start{0}; ///< time when CPU overload started
hrt_abstime _led_armed_state_toggle{0};
hrt_abstime _led_overload_toggle{0};
#if !defined(CONFIG_ARCH_LEDS) && defined(BOARD_HAS_CONTROL_STATUS_LEDS)
hrt_abstime _led_armed_state_toggle {0};
#endif
hrt_abstime _led_overload_toggle {0};
hrt_abstime _last_health_and_arming_check{0};
@@ -40,6 +40,7 @@
#include <uORB/topics/vehicle_status.h>
#include <uORB/topics/failsafe_flags.h>
#include <systemlib/mavlink_log.h>
#include <drivers/drv_hrt.h>
#include <stdint.h>
#include <limits.h>
@@ -68,7 +68,6 @@
#include "checks/vtolCheck.hpp"
#include "checks/offboardCheck.hpp"
class HealthAndArmingChecks : public ModuleParams
{
public:
@@ -38,12 +38,14 @@
#ifdef __PX4_DARWIN
#include <sys/param.h>
#include <sys/mount.h>
#else
#elif defined(PX4_STORAGEDIR)
#include <sys/statfs.h>
#endif
void SdCardChecks::checkAndReport(const Context &context, Report &reporter)
{
#ifdef PX4_STORAGEDIR
if (_param_com_arm_sdcard.get() > 0) {
struct statfs statfs_buf;
@@ -125,4 +127,5 @@ void SdCardChecks::checkAndReport(const Context &context, Report &reporter)
}
#endif /* __PX4_NUTTX */
#endif /* PX4_STORAGEDIR */
}
@@ -44,11 +44,13 @@ public:
void checkAndReport(const Context &context, Report &reporter) override;
private:
bool _sdcard_detected{false};
#ifdef PX4_STORAGEDIR
bool _sdcard_detected {false};
#ifdef __PX4_NUTTX
bool _hardfault_checked_once {false};
bool _hardfault_file_present{false};
bool _hardfault_file_present {false};
#endif
#endif
DEFINE_PARAMETERS_CUSTOM_PARENT(HealthAndArmingCheckBase,