mirror of
https://github.com/adafruit/Adafruit_GPS.git
synced 2026-10-27 06:20:18 +00:00
Refactor I2C request call for GPS data
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
1 parent
c04d2595fc
commit
4c02b0035f
1 file changed
+3
-2
@@ -308,8 +308,9 @@ char Adafruit_GPS::read(void) {
|
||||
_buff_idx++;
|
||||
} else {
|
||||
// refill the buffer!
|
||||
if (gpsI2C->requestFrom(_i2caddr, (uint8_t)GPS_MAX_I2C_TRANSFER,
|
||||
(uint8_t)true) == GPS_MAX_I2C_TRANSFER) {
|
||||
if (gpsI2C->requestFrom((uint8_t)_i2caddr,
|
||||
(uint8_t)GPS_MAX_I2C_TRANSFER,
|
||||
true) == GPS_MAX_I2C_TRANSFER) {
|
||||
// got data!
|
||||
_buff_max = 0;
|
||||
char curr_char = 0;
|
||||
|
||||
Reference in new issue
Block a user