Skip to content

Commit

Permalink
refactor assumCallibration to have same code for dal and codal
Browse files Browse the repository at this point in the history
  • Loading branch information
Amerlander committed May 13, 2024
1 parent 8ed7018 commit acf68d8
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions libs/scratch/MbitMoreDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,11 @@ MbitMoreDevice::MbitMoreDevice(MicroBit &_uBit) : uBit(_uBit) {
// Reset compass

if (!uBit.compass.isCalibrated()) {
#if MICROBIT_CODAL
CompassCalibration dummyCalibration;
dummyCalibration.centre = Sample3D(0, 0, 0); // Assuming the centre is at (0, 0, 0)
dummyCalibration.scale = Sample3D(1, 1, 1); // Assuming no scaling
dummyCalibration.radius = 100; // Assuming a radius of 100
uBit.compass.setCalibration(dummyCalibration);
#else // NOT MICROBIT_CODAL
uBit.compass.assumeCalibration();
#endif // NOT MICROBIT_CODAL
}

if (uBit.buttonA.isPressed()) {
Expand Down

0 comments on commit acf68d8

Please sign in to comment.