Skip to content

Commit

Permalink
Add features from slimevr modified library
Browse files Browse the repository at this point in the history
  • Loading branch information
cparata committed Feb 19, 2024
1 parent 6d5f6a8 commit 7c9320d
Show file tree
Hide file tree
Showing 8 changed files with 888 additions and 263 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void setup()
LSM6DSV16X.Enable_X();

// Enable 6D Orientation.
LSM6DSV16XStatusTypeDef ret = LSM6DSV16X.Enable_6D_Orientation(LSM6DSV16X_INT1_PIN);
LSM6DSV16X.Enable_6D_Orientation(LSM6DSV16X_INT1_PIN);
}

void loop()
Expand Down
16 changes: 8 additions & 8 deletions examples/LSM6DSV16X_Sensor_Fusion/LSM6DSV16X_Sensor_Fusion.ino
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,17 @@ void setup()
Wire.begin();
// Initialize LSM6DSV16X.
AccGyr.begin();
AccGyr.Enable_X();
AccGyr.Enable_G();

// Enable Sensor Fusion
status |= AccGyr.Set_X_FS(4);
status |= AccGyr.Set_G_FS(2000);
status |= AccGyr.Set_X_ODR(120.0f);
status |= AccGyr.Set_G_ODR(120.0f);
status |= AccGyr.Set_SFLP_ODR(120.0f);
status |= AccGyr.Enable_Rotation_Vector();
status |= AccGyr.FIFO_Set_Mode(LSM6DSV16X_STREAM_MODE);

if (status != LSM6DSV16X_OK) {
Serial.println("LSM6DSV16X Sensor failed to init/configure");
Expand Down Expand Up @@ -93,11 +101,3 @@ void loop()
}
}
}








28 changes: 28 additions & 0 deletions keywords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ Get_X_Axes KEYWORD2
Get_X_DRDY_Status KEYWORD2
Set_X_Power_Mode KEYWORD2
Set_X_Filter_Mode KEYWORD2
Enable_X_User_Offset KEYWORD2
Disable_X_User_Offset KEYWORD2
Set_X_User_Offset KEYWORD2
Enable_G KEYWORD2
Disable_G KEYWORD2
Get_G_Sensitivity KEYWORD2
Expand All @@ -43,6 +46,12 @@ Get_G_Axes KEYWORD2
Get_G_DRDY_Status KEYWORD2
Set_G_Power_Mode KEYWORD2
Set_G_Filter_Mode KEYWORD2
Get_Temp_ODR KEYWORD2
Set_Temp_ODR KEYWORD2
Get_Temp_Raw KEYWORD2
Test_IMU KEYWORD2
Test_X_IMU KEYWORD2
Test_G_IMU KEYWORD2
Read_Reg KEYWORD2
Write_Reg KEYWORD2
Enable_6D_Orientation KEYWORD2
Expand Down Expand Up @@ -106,7 +115,21 @@ Disable_Gyroscope_Bias KEYWORD2
FIFO_Get_Rotation_Vector KEYWORD2
FIFO_Get_Gravity_Vector KEYWORD2
FIFO_Get_Gyroscope_Bias KEYWORD2
FIFO_Get_Status KEYWORD2
FIFO_Enable_Timestamp KEYWORD2
FIFO_Disable_Timestamp KEYWORD2
FIFO_Set_Timestamp_Decimation KEYWORD2
FIFO_Get_Timestamp KEYWORD2
FIFO_Reset KEYWORD2
Set_SFLP_Batch KEYWORD2
Set_SFLP_ODR KEYWORD2
Set_SFLP_GBIAS KEYWORD2
Reset_SFLP KEYWORD2
Enable_Block_Data_Update KEYWORD2
Disable_Block_Data_Update KEYWORD2
Enable_Auto_Increment KEYWORD2
Disable_Auto_Increment KEYWORD2
Device_Reset KEYWORD2

#######################################
# Constants (LITERAL1)
Expand Down Expand Up @@ -136,4 +159,9 @@ LSM6DSV16X_GYRO_HIGH_PERFORMANCE_MODE LITERAL1
LSM6DSV16X_GYRO_HIGH_ACCURACY_MODE LITERAL1
LSM6DSV16X_GYRO_SLEEP_MODE LITERAL1
LSM6DSV16X_GYRO_LOW_POWER_MODE LITERAL1
LSM6DSV16X_QVAR_GAIN LITERAL1
LSM6DSV16X_MIN_ST_LIMIT_mg LITERAL1
LSM6DSV16X_MAX_ST_LIMIT_mg LITERAL1
LSM6DSV16X_MIN_ST_LIMIT_mdps LITERAL1
LSM6DSV16X_MAX_ST_LIMIT_mdps LITERAL1

2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=STM32duino LSM6DSV16X
version=1.7.3
version=2.0.0
author=SRA
maintainer=stm32duino
sentence=Ultra Low Power inertial measurement unit.
Expand Down
Loading

0 comments on commit 7c9320d

Please sign in to comment.