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:
Limor "Ladyada" FriedandCopilot Autofix powered by AI authored and GitHub committed 2026-09-14 20:22:54 -04:00
1 parent c04d2595fc
commit 4c02b0035f
1 file changed
+3 -2
+3 -2
View File
@@ -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;