-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNS - Changes for IMUs to work #152
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
There was a problem hiding this 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!
@@ -105,7 +105,7 @@ Spi::Spi(Logger &log) : spi_fd_(-1), hw_(0), ch_(0), log_(log) | |||
} | |||
|
|||
// set clock frequency | |||
setClock(Clock::k1MHz); | |||
setClock(Clock::k500KHz); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
@@ -133,7 +133,7 @@ void Gpio::exportGPIO() | |||
// let the kernel know we are using this pin | |||
int fd; | |||
uint32_t len; | |||
fd = open("/sys/class/gpio/export", O_WRONLY); | |||
fd = open("/sys/class/gpio/export", O_RDWR); |
There was a problem hiding this comment.
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
.
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.