-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding support for adis16545-3 sensor, initial commit Signed-off-by: rbudai <[email protected]>
- Loading branch information
Showing
16 changed files
with
1,081 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/imu_ros2_node: | ||
ros__parameters: | ||
command_to_execute: no_command | ||
measured_data_topic_selection: 3 | ||
iio_context_string: ip:192.168.0.1 | ||
accel_calibbias_x: 0 | ||
accel_calibscale_x: 0 | ||
accel_calibbias_y: 0 | ||
accel_calibscale_y: 0 | ||
accel_calibbias_z: 0 | ||
accel_calibscale_z: 0 | ||
anglvel_calibbias_x: 0 | ||
anglvel_calibscale_x: 0 | ||
anglvel_calibbias_y: 0 | ||
anglvel_calibscale_y: 0 | ||
anglvel_calibbias_z: 0 | ||
anglvel_calibscale_z: 0 | ||
sampling_frequency: 4250.0 | ||
linear_acceleration_compensation: 1 | ||
bias_correction_time_base_control: 10 | ||
x_axis_gyroscope_bias_correction_enable: 0 | ||
y_axis_gyroscope_bias_correction_enable: 0 | ||
z_axis_gyroscope_bias_correction_enable: 0 | ||
x_axis_accelerometer_bias_correction_enable: 1 | ||
y_axis_accelerometer_bias_correction_enable: 1 | ||
z_axis_accelerometer_bias_correction_enable: 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
#ifndef ADIS1654X_DATA_ACCESS_H | ||
#define ADIS1654X_DATA_ACCESS_H | ||
|
||
// has delta channels | ||
#define ADIS_HAS_DELTA_BURST | ||
|
||
// has calibration scale channel | ||
#define ADIS_HAS_CALIB_SCALE | ||
|
||
#define ADIS_FLS_MEM_ENDURANCE 100000 | ||
#define ADIS_MAX_SAMP_FREQ 4250.0 | ||
|
||
// value to add to reg addr per page | ||
#define ADIS_PAGE_ID_VAL 0x80 | ||
|
||
// global commands | ||
#define ADIS_GLOB_CMD_PAGE_ID 0x03 | ||
#define ADIS_GLOB_CMD_ADDR_WITHOUT_PAGE 0x02 | ||
#define ADIS_GLOB_CMD_ADDR \ | ||
(ADIS_PAGE_ID_VAL * ADIS_PT_OF_PERC_PAGE_ID + ADIS_GLOB_CMD_ADDR_WITHOUT_PAGE) | ||
|
||
#define ADIS_BIAS_CORRECTION_UPDATE_POS 0 | ||
#define ADIS_SENSOR_SELF_TEST_POS 1 | ||
#define ADIS_FLASH_MEMORY_UPDATE_POS 3 | ||
#define ADIS_FACTORY_CALIBRATION_RESTORE_POS 6 | ||
#define ADIS_SOFTWARE_RESET_CMD_POS 7 | ||
|
||
#define ADIS_BIAS_CORRECTION_UPDATE (1 << ADIS_BIAS_CORRECTION_UPDATE_POS) | ||
#define ADIS_SENSOR_SELF_TEST (1 << ADIS_SENSOR_SELF_TEST_POS) | ||
#define ADIS_FLASH_MEMORY_UPDATE (1 << ADIS_FLASH_MEMORY_UPDATE_POS) | ||
#define ADIS_FACTORY_CALIBRATION_RESTORE (1 << ADIS_FACTORY_CALIBRATION_RESTORE_POS) | ||
#define ADIS_SOFTWARE_RESET_CMD (1 << ADIS_SOFTWARE_RESET_CMD_POS) | ||
|
||
// status and error flag indication | ||
#define ADIS_DIAG_STAT_PAGE_ID 0x00 | ||
#define ADIS_DIAG_STAT_ADDR_WITHOUT_PAGE 0x08 | ||
#define ADIS_DIAG_STAT_ADDR \ | ||
(ADIS_PAGE_ID_VAL * ADIS_DIAG_STAT_PAGE_ID + ADIS_DIAG_STAT_ADDR_WITHOUT_PAGE) | ||
#define ADIS_MEM_FAIL_POS 1 | ||
#define ADIS_CRC_ERROR_POS 2 | ||
#define ADIS_SPI_COMM_ERR_POS 3 | ||
#define ADIS_SNSR_FAIL_POS 5 | ||
#define ADIS_FLS_MEM_UPDATE_FAIL_POS 6 | ||
#define ADIS_DATA_PATH_OVERRUN_POS 7 | ||
#define ADIS_CLK_ERR_POS 8 | ||
#define ADIS_WDG_TIMER_FLAG_POS 15 | ||
|
||
#define ADIS_MEM_FAIL (1 << ADIS_MEM_FAIL_POS) | ||
#define ADIS_CRC_ERROR (1 << ADIS_CRC_ERROR_POS) | ||
#define ADIS_SPI_COMM_ERR (1 << ADIS_SPI_COMM_ERR_POS) | ||
#define ADIS_SNSR_FAIL (1 << ADIS_SNSR_FAIL_POS) | ||
#define ADIS_FLS_MEM_UPDATE_FAIL (1 << ADIS_FLS_MEM_UPDATE_FAIL_POS) | ||
#define ADIS_DATA_PATH_OVERRUN (1 << ADIS_DATA_PATH_OVERRUN_POS) | ||
#define ADIS_CLK_ERR (1 << ADIS_CLK_ERR_POS) | ||
#define ADIS_WDG_TIMER_FLAG (1 << ADIS_WDG_TIMER_FLAG_POS) | ||
|
||
// self test error flags | ||
#define ADIS_DIAG_STS_PAGE_ID 0x00 | ||
#define ADIS_DIAG_STS_REG_WITHOUT_PAGE 0x0A | ||
#define ADIS_DIAG_STS_REG \ | ||
(ADIS_PAGE_ID_VAL * ADIS_DIAG_STS_PAGE_ID + ADIS_DIAG_STS_REG_WITHOUT_PAGE) | ||
|
||
#define ADIS_GYRO_ACCEL_FAIL_REG ADIS_DIAG_STS_REG | ||
#define ADIS_GYRO_X_FAIL_POS 0 | ||
#define ADIS_GYRO_Y_FAIL_POS 1 | ||
#define ADIS_GYRO_Z_FAIL_POS 2 | ||
#define ADIS_ACCEL_X_FAIL_POS 3 | ||
#define ADIS_ACCEL_Y_FAIL_POS 4 | ||
#define ADIS_ACCEL_Z_FAIL_POS 5 | ||
|
||
#define ADIS_GYRO_X_FAIL (1 << ADIS_GYRO_X_FAIL_POS) | ||
#define ADIS_GYRO_Y_FAIL (1 << ADIS_GYRO_Y_FAIL_POS) | ||
#define ADIS_GYRO_Z_FAIL (1 << ADIS_GYRO_Z_FAIL_POS) | ||
#define ADIS_ACCEL_X_FAIL (1 << ADIS_ACCEL_X_FAIL_POS) | ||
#define ADIS_ACCEL_Y_FAIL (1 << ADIS_ACCEL_Y_FAIL_POS) | ||
#define ADIS_ACCEL_Z_FAIL (1 << ADIS_ACCEL_Z_FAIL_POS) | ||
|
||
// measurement range identifier | ||
#define ADIS_RANG_MDL_PAGE_ID 0x03 | ||
#define ADIS_RANG_MDL_ADDR_WITHOUT_PAGE 0x12 | ||
#define ADIS_RANG_MDL_ADDR \ | ||
(ADIS_PAGE_ID_VAL * ADIS_RANG_MDL_PAGE_ID + ADIS_RANG_MDL_ADDR_WITHOUT_PAGE) | ||
#define ADIS_GYRO_MEAS_RANG_POS 2 | ||
#define ADIS_GYRO_MEAS_RANG (3 << ADIS_GYRO_MEAS_RANG_POS) | ||
|
||
// point of percussion | ||
#define ADIS_PT_OF_PERC_PAGE_ID 0x03 | ||
#define ADIS_PT_OF_PERC_REG_ADDR_WITHOUT_PAGE 0x0A | ||
#define ADIS_PT_OF_PERC_REG_ADDR \ | ||
(ADIS_PAGE_ID_VAL * ADIS_PT_OF_PERC_PAGE_ID + ADIS_PT_OF_PERC_REG_ADDR_WITHOUT_PAGE) | ||
#define ADIS_PT_OF_PERC_ALGNMNT_POS 6 | ||
#define ADIS_PT_OF_PERC_ALGNMNT (1 << ADIS_PT_OF_PERC_ALGNMNT_POS) | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.