|
| | LSM9DS1Sensor () |
| | Construct a new LSM9DS1Sensor object with default minimum_period of 0.
|
| |
| | LSM9DS1Sensor (unsigned long minimum_period) |
| | Construct a new LSM9DS1Sensor object, given mininum_period between sensor reads.
|
| |
| bool | verify () override |
| | Verifies that the LSM is connected and working.
|
| |
| String | readData () override |
| | Retrieves data from LSM 9-axis IMU.
|
| |
| void | calibrate () |
| | Calibrates the LSM9DS1 sensor by collecting offset data for gyro and accel.
|
| |
| void | readDataPacket (uint8_t *&packet) override |
| | Appends the LSM9DS1 sensor data to the packet buffer as raw bytes.
|
| |
| String | decodeToCSV (uint8_t *&packet) override |
| | Decodes the LSM9DS1 sensor data from the packet buffer into a CSV string.
|
| |
| | Sensor (String sensor_name, String csv_header, unsigned long minimum_period) |
| |
| | Sensor (String sensor_name, String csv_header) |
| |
| | Sensor (String sensor_name, String csv_header, int fields) |
| | Construct a new Sensor object with default minimum_period of 0 (depreciated)
|
| |
| | Sensor (String sensor_name, String csv_header, int fields, unsigned long minimum_period) |
| | Construct a new Sensor object (Depreciated)
|
| |
| unsigned long | getPeriod () const |
| | Get the minimum minimum_period between sensor reads in ms.
|
| |
| void | setPeriod (int minimum_period) |
| | Set the minimum minimum_period between sensor reads in ms.
|
| |
| unsigned long | getLastExecution () const |
| | Get the system time of the last execution in ms.
|
| |
| void | setLastExecution (int last_execution) |
| | Set the system time of the last execution in ms.
|
| |
| const String & | getSensorCSVHeader () const |
| | Get the csv header string associated with this sensor.
|
| |
| void | getDataPacket (uint32_t &sensor_id, uint8_t *&packet) |
| | Append the data from a sensor to the packet if the minium period is satisfied.
|
| |
| String | readEmpty () const |
| | Returns CSV line in the same format as readData() but with "-" instead of data.
|
| |
| String | getDataCSV () |
| | Uses readData and readEmpty to get the data-filled or empty-celled CSV line for the sensor.
|
| |
| | Device (String device_name) |
| | Default constructor, sets a max_attempt of 1 (device recovery won't be attempted)
|
| |
| | Device (String device_name, int max_attempts, int wait_factor) |
| |
| const String & | getDeviceName () |
| |
| bool | getVerified () |
| | Get if the Device is Verified.
|
| |
| void | recoveryConfig (int max_attempts, int wait_factor) |
| | Set recovery config (used keep default constructor)
|
| |
| void | setWaitFactor (int wait_factor) |
| | Set wait_factor.
|
| |
| void | setMaxAttempts (int max_attempts) |
| | Set max_attempts.
|
| |
| bool | attemptConnection () |
| | If the sensor is verified, return true, if not and it has been long enough since the last attempt (decided by wait_factor and attempt_number), attempt to reverify (reinitialize) it.
|
| |
Implementation of the Sensor class for the LSM9DS1 (9-axis IMU)
| void LSM9DS1Sensor::readDataPacket |
( |
uint8_t *& |
packet | ) |
|
|
overridevirtual |
Appends the LSM9DS1 sensor data to the packet buffer as raw bytes.
The following data are appended in order:
- Date: day (uint8_t), month (uint8_t), year (uint16_t)
- Latitude (float)
- Longitude (float)
- Speed (float)
- Angle (float)
- Altitude (float)
- Satellites (uint8_t)
If no valid fix is available, default value (0) is appended for all fields.
- Parameters
-
| packet | Pointer to the packet byte array. This pointer is incremented as each value is copied. |
Reimplemented from Sensor.