Update AccelerometerThread.h to work with T-Watch S3

This commit is contained in:
Kevin Cai 2024-03-10 18:24:32 -04:00 committed by Thomas Göttgens
parent eb372c190e
commit 766beefbc5

View File

@ -103,12 +103,21 @@ class AccelerometerThread : public concurrency::OSThread
#endif #endif
struct bma423_axes_remap remap_data; struct bma423_axes_remap remap_data;
#ifdef T_WATCH_S3
remap_data.x_axis = 1;
remap_data.x_axis_sign = 0;
remap_data.y_axis = 0;
remap_data.y_axis_sign = 0;
remap_data.z_axis = 2;
remap_data.z_axis_sign = 1;
#else
remap_data.x_axis = 0; remap_data.x_axis = 0;
remap_data.x_axis_sign = 1; remap_data.x_axis_sign = 1;
remap_data.y_axis = 1; remap_data.y_axis = 1;
remap_data.y_axis_sign = 0; remap_data.y_axis_sign = 0;
remap_data.z_axis = 2; remap_data.z_axis = 2;
remap_data.z_axis_sign = 1; remap_data.z_axis_sign = 1;
#endif
// Need to raise the wrist function, need to set the correct axis // Need to raise the wrist function, need to set the correct axis
bmaSensor.setRemapAxes(&remap_data); bmaSensor.setRemapAxes(&remap_data);
// sensor.enableFeature(BMA423_STEP_CNTR, true); // sensor.enableFeature(BMA423_STEP_CNTR, true);
@ -171,4 +180,4 @@ class AccelerometerThread : public concurrency::OSThread
Adafruit_LIS3DH lis; Adafruit_LIS3DH lis;
}; };
} // namespace concurrency } // namespace concurrency