139 "Stability Threshold (RMS)",
"%.4f", 0, 100, 0, 5);
306 for (
int i = 0; i < n; i++)
310 std::string switchName = names[i];
428 auto getCalibrationState = [](
int value) ->
IPState
513 const std::string &sensorStatus)
const char * getDeviceName() const
Class to provide extended functionality for devices in addition to the functionality provided by INDI...
virtual bool saveConfig(bool silent=false, const char *property=nullptr)
Save the current properties in a configuration file.
virtual bool deleteProperty(const char *propertyName)
Delete a property and unregister it. It will also be deleted from all clients.
void defineProperty(INumberVectorProperty *property)
virtual bool ResetCalibration()
ResetCalibration Reset calibration data.
bool processSwitch(const std::string &dev, const std::string &name, ISState *states, char *names[], int n)
Process IMU switch properties.
@ CALIBRATION_CONTROL_START
@ CALIBRATION_CONTROL_SAVE
@ CALIBRATION_CONTROL_LOAD
@ CALIBRATION_CONTROL_RESET
virtual bool SetOrientationData(double roll, double pitch, double yaw, double w=0.0)
SetOrientationData Set the orientation data (Roll, Pitch, Yaw, Quaternion W)
virtual bool SetStabilityMonitoring(double vibrationLevel, double stabilityThreshold)
SetStabilityMonitoring Set vibration level and alert threshold.
virtual bool SaveCalibrationData()
SaveCalibrationData Save the current calibration data.
INDI::PropertyNumber TemperatureNP
bool saveConfigItems(FILE *fp)
saveConfigItems Save IMU properties in config file
@ CALIBRATION_STATUS_ACCEL
@ CALIBRATION_STATUS_GYRO
virtual bool SetGyroscopeData(double x, double y, double z)
SetGyroscopeData Set the angular velocity data.
bool processText(const std::string &dev, const std::string &name, char *texts[], char *names[], int n)
Process IMU text properties.
INDI::PropertyNumber OrientationNP
INDI::PropertySwitch AngularUnitsSP
virtual bool SetAccelerationData(double x, double y, double z)
SetAccelerationData Set the linear acceleration data.
IMUInterface(DefaultDevice *defaultDevice)
@ DISTANCE_UNITS_IMPERIAL
INDI::PropertyNumber StabilityMonitoringNP
@ ORIENTATION_QUATERNION_W
virtual bool LoadCalibrationData()
LoadCalibrationData Load previously saved calibration data.
virtual bool SetAngularUnits(bool degrees)
SetAngularUnits Set the angular units for sensor data.
INDI::PropertyNumber UpdateRateNP
virtual bool SetTemperature(double temperature)
SetTemperature Set the internal chip temperature.
virtual bool SetMagnetometerData(double x, double y, double z)
SetMagnetometerData Set the magnetic field strength data.
INDI::PropertyText DeviceInfoTP
INDI::PropertyNumber AccelerationNP
INDI::PropertySwitch CalibrationControlSP
INDI::PropertyLight CalibrationStatusLP
virtual bool StartCalibration()
StartCalibration Initiate the calibration sequence.
virtual bool SetDeviceInfo(const std::string &chipID, const std::string &firmwareVersion, const std::string &sensorStatus)
SetDeviceInfo Set chip ID, firmware version, and sensor status.
INDI::PropertyNumber GyroscopeNP
const std::string COORDINATES_TAB
@ STABILITY_MONITORING_STABILITY_THRESHOLD
@ STABILITY_MONITORING_VIBRATION_LEVEL
virtual bool SetCalibrationStatus(int sys, int gyro, int accel, int mag)
SetCalibrationStatus Set the calibration status for each sensor.
virtual bool SetDistanceUnits(bool metric)
SetUnits Set the units for sensor data.
@ DEVICE_INFO_SENSOR_STATUS
@ DEVICE_INFO_FIRMWARE_VERSION
bool HasStabilityMonitoring()
bool updateProperties()
updateProperties Define or Delete IMU properties based on the connection status of the base device
bool processNumber(const std::string &dev, const std::string &name, double values[], char *names[], int n)
Process IMU number properties.
virtual bool SetPowerMode(const std::string &mode)
SetPowerMode Set the power mode of the IMU sensor.
virtual bool SetUpdateRate(double rate)
SetUpdateRate Set the sensor polling frequency.
const std::string STATUS_TAB
INDI::PropertyNumber DataThresholdNP
INDI::PropertyNumber MagnetometerNP
INDI::PropertySwitch OperationModeSP
INDI::PropertySwitch DistanceUnitsSP
INDI::PropertySwitch PowerModeSP
const std::string CALIBRATION_TAB
void initProperties(const std::string &groupName)
Initialize IMU properties. It is recommended to call this function within initProperties() of your pr...
virtual bool SetOperationMode(const std::string &mode)
SetOperationMode Set the operation mode of the IMU sensor.
void setState(IPState state)
void apply(const char *format,...) const ATTRIBUTE_FORMAT_PRINTF(2
void save(FILE *f) const
save Save property to configuration file.
bool isNameMatch(const char *otherName) const
void fill(const char *device, const char *name, const char *label, const char *group, IPState state)
bool update(const double values[], const char *const names[], int n)
void fill(const char *device, const char *name, const char *label, const char *group, IPerm permission, double timeout, IPState state)
bool update(const ISState states[], const char *const names[], int n)
int findOnSwitchIndex() const
void fill(const char *device, const char *name, const char *label, const char *group, IPerm permission, ISRule rule, double timeout, IPState state)
void fill(const char *device, const char *name, const char *label, const char *group, IPerm permission, double timeout, IPState state)
const char * OPTIONS_TAB
OPTIONS_TAB Where all the driver's options are located. Those may include auxiliary controls,...
Namespace to encapsulate INDI client, drivers, and mediator classes.