Skip to content

SNS - Changes for IMUs to work#152

Open
ishmis wants to merge 6 commits into
masterfrom
sns-imu
Open

SNS - Changes for IMUs to work#152
ishmis wants to merge 6 commits into
masterfrom
sns-imu

Conversation

@ishmis
Copy link
Copy Markdown
Contributor

@ishmis ishmis commented Jun 10, 2022

Slight modifications which gets the IMU-20948 to work with our code on the beagleboneblack.

Giving read and write permissions when opening gpio export file to prevent consistent export errors.

@ishmis ishmis requested review from kshxtij and mifrandir as code owners June 10, 2022 14:47
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 10, 2022

Codecov Report

Merging #152 (7152017) into master (516a539) will decrease coverage by 0.03%.
The diff coverage is 11.11%.

@@            Coverage Diff             @@
##           master     #152      +/-   ##
==========================================
- Coverage   38.20%   38.16%   -0.04%     
==========================================
  Files          69       69              
  Lines        3942     3946       +4     
==========================================
  Hits         1506     1506              
- Misses       2436     2440       +4     
Impacted Files Coverage Δ
src/sensors/imu.cpp 49.35% <0.00%> (-0.33%) ⬇️
src/utils/io/spi.cpp 9.52% <16.66%> (-0.29%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 516a539...7152017. Read the comment docs.

Comment thread src/utils/io/spi.cpp Outdated
@ishmis ishmis added the sensors label Jun 11, 2022
@ishmis ishmis requested a review from kshxtij June 11, 2022 09:17
Copy link
Copy Markdown
Member

@mifrandir mifrandir left a comment

Choose a reason for hiding this comment

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

Small things; good stuff otherwise!

Comment thread src/sensors/imu.cpp
Comment thread src/utils/io/spi.cpp
Comment thread src/utils/io/spi.cpp

// set clock frequency
setClock(Clock::k1MHz);
setClock(Clock::k500KHz);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this required? Did we test it? Has it to do with the new IMUs?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, yes and yes. Although this just needs to be tested with the sensors PCB but with an individual IMU, this worked.

Comment thread src/utils/io/spi.cpp Outdated
@ishmis ishmis requested a review from mifrandir June 23, 2022 11:46
Comment thread src/utils/io/gpio.cpp
int fd;
uint32_t len;
fd = open("/sys/class/gpio/export", O_WRONLY);
fd = open("/sys/class/gpio/export", O_RDWR);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You've touched this line now so we need to do this properly.

const auto fd = open(/* ... */);

Similar for len.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants