Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

Query module regardless of interface type to prove isConnected() #112

Merged
merged 1 commit into from
May 26, 2020

Conversation

nseidle
Copy link
Member

@nseidle nseidle commented May 24, 2020

Greatly increases confidence over I2C comm that we are talking to a ublox module. This was already available for Serial (thank you @PaulZC!) but extends it for I2C (and theoretically for SPI someday).

This was needed for auto-detection routines for OpenLog Artemis. We need more than just ack's to verify a thing is what we think it is at address 0x42.

Greatly increases confidence over I2C comm that we are talking to a ublox module.
@nseidle
Copy link
Member Author

nseidle commented May 24, 2020

Hrmm, sorry about the other white space fix noise. VSC can get a little squirrelly.

@nseidle nseidle requested a review from PaulZC May 26, 2020 17:05
@nseidle
Copy link
Member Author

nseidle commented May 26, 2020

@PaulZC - Please have a look and merge at your discretion.

@PaulZC
Copy link
Collaborator

PaulZC commented May 26, 2020

I think the only issue with this is that if the module is hammering the I2C buffer with auto-PVT messages then sendCommand might fail. Whereas a simple beginTransmission+endTransmission will always succeed.
That said, it just makes the I2C isConnected the same as Serial. Any extra failures it introduces should be minimal, or only appear when the bus is under duress. We can always regress if required. Merging...

@PaulZC PaulZC merged commit a1d0937 into master May 26, 2020
@PaulZC PaulZC deleted the improveIsConnected branch July 25, 2020 20:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants