mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-24 15:40:31 +08:00
i2c drivers: add '-k' flag for keep_running directly to BusCLIArguments
This commit is contained in:
@@ -110,6 +110,7 @@ public:
|
||||
spi_mode_e spi_mode{SPIDEV_MODE3};
|
||||
uint8_t i2c_address{0}; ///< optional I2C address: a driver can set this to allow configuring the I2C address
|
||||
bool quiet_start{false}; ///< do not print a message when startup fails
|
||||
bool keep_running{false}; ///< keep driver running even if no device is detected on startup
|
||||
|
||||
uint8_t orientation{0}; ///< distance_sensor_s::ROTATION_*
|
||||
|
||||
@@ -121,6 +122,8 @@ public:
|
||||
int default_spi_frequency{-1}; ///< default spi bus frequency (driver needs to set this) [Hz]
|
||||
int default_i2c_frequency{-1}; ///< default i2c bus frequency (driver needs to set this) [Hz]
|
||||
|
||||
bool support_keep_running{false}; ///< true if keep_running (see above) is supported
|
||||
|
||||
private:
|
||||
bool validateConfiguration();
|
||||
|
||||
|
||||
@@ -513,6 +513,11 @@ __EXPORT void PRINT_MODULE_USAGE_PARAMS_I2C_SPI_DRIVER(bool i2c_support, bool sp
|
||||
*/
|
||||
__EXPORT void PRINT_MODULE_USAGE_PARAMS_I2C_ADDRESS(uint8_t default_address);
|
||||
|
||||
/**
|
||||
* -k flag
|
||||
*/
|
||||
__EXPORT void PRINT_MODULE_USAGE_PARAMS_I2C_KEEP_RUNNING_FLAG(void);
|
||||
|
||||
/** @note Each of the PRINT_MODULE_USAGE_PARAM_* methods apply to the previous PRINT_MODULE_USAGE_COMMAND_DESCR(). */
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user