From 3e6b9b4d80d52f1f07bf243af9dbcb32de81f9cc Mon Sep 17 00:00:00 2001 From: jonnew Date: Wed, 18 Dec 2024 11:53:34 -0500 Subject: [PATCH 1/2] Fix ConfigurePolledBno055 operation mode - It was incorrectly configured in IMU mode (which only uses gyroscope and accelerometer). Now its correctly configured to use magnetometer in NDOF mode, which should reduce drift. --- OpenEphys.Onix1/ConfigurePolledBno055.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenEphys.Onix1/ConfigurePolledBno055.cs b/OpenEphys.Onix1/ConfigurePolledBno055.cs index 3bbda70..f88ba80 100644 --- a/OpenEphys.Onix1/ConfigurePolledBno055.cs +++ b/OpenEphys.Onix1/ConfigurePolledBno055.cs @@ -119,7 +119,7 @@ void ConfigureBno055(DeviceContext device) i2c.WriteByte(0x3F, 0x00); // Internal oscillator i2c.WriteByte(0x41, (uint)AxisMap); // Axis map config i2c.WriteByte(0x42, (uint)AxisSign); // Axis sign - i2c.WriteByte(0x3D, 8); // Operation mode is NOF + i2c.WriteByte(0x3D, 0x0C); // Operation mode is NOF } } From de2003cd7d3081f047bc9f6801b27856753749c1 Mon Sep 17 00:00:00 2001 From: cjsha Date: Wed, 18 Dec 2024 14:21:03 -0500 Subject: [PATCH 2/2] Typo: "NOF" -> "NDOF" --- OpenEphys.Onix1/ConfigurePolledBno055.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenEphys.Onix1/ConfigurePolledBno055.cs b/OpenEphys.Onix1/ConfigurePolledBno055.cs index f88ba80..ce542d0 100644 --- a/OpenEphys.Onix1/ConfigurePolledBno055.cs +++ b/OpenEphys.Onix1/ConfigurePolledBno055.cs @@ -119,7 +119,7 @@ void ConfigureBno055(DeviceContext device) i2c.WriteByte(0x3F, 0x00); // Internal oscillator i2c.WriteByte(0x41, (uint)AxisMap); // Axis map config i2c.WriteByte(0x42, (uint)AxisSign); // Axis sign - i2c.WriteByte(0x3D, 0x0C); // Operation mode is NOF + i2c.WriteByte(0x3D, 0x0C); // Operation mode is NDOF } }