Skip to content

LSM9DS1 interrupts#5

Open
seanboe wants to merge 6 commits into
ucsd-cubesat:mainfrom
seanboe:LSM9DS1-interrupts
Open

LSM9DS1 interrupts#5
seanboe wants to merge 6 commits into
ucsd-cubesat:mainfrom
seanboe:LSM9DS1-interrupts

Conversation

@seanboe

@seanboe seanboe commented Apr 15, 2022

Copy link
Copy Markdown
Member

Added interrupt functionality to the LSM9DS1 library.

seanboe added 6 commits April 14, 2022 10:09
Only some very slight changes, but I (at least within main.cpp and the SPIDevice and LSM9DS1 libraries) removed the dependency on the UART.h library since this isn't support for teensy lc. The main change was modifying all references to pin_size_t to uint16_t and adding SPI.begin() to setup.
@seanboe seanboe requested a review from UselessMnemonic April 15, 2022 22:17
Comment thread lib/LSM9DS1/LSM9DS1.cpp
}


void LSM9DS1::setGyroActivity(bool wake) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review this method and the registers used, please add clarifying comments on the register in the header file

Comment thread lib/LSM9DS1/LSM9DS1.cpp
z = z_raw * resolution / 1000;
}

void LSM9DS1::configXLInterrupt(INT_XL_CONFIG intConfig, bool andInterrupt, uint8_t duration) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read the configuration in the registers here and update those values instead of writing directly to the register to avoid overwriting bits that were already set

Comment thread src/main.cpp
@@ -1,21 +1,24 @@
#include <Arduino.h>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please migrate main code here to its own test file that we can invoke individually

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Investigate what testing suite or general testing support is offered by PlatformIO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants