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

Commit 5b20675

Browse files
committed
Dereferences packetCfg (now that it's a pointer) instead of referencing global
1 parent 9f11129 commit 5b20675

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/SparkFun_Ublox_Arduino_Library.cpp

+8-5
Original file line numberDiff line numberDiff line change
@@ -2717,7 +2717,7 @@ boolean SFE_UBLOX_GPS::getEsfInfo(uint16_t maxWait)
27172717
packetCfg.len = 0;
27182718
packetCfg.startingSpot = 0;
27192719

2720-
if (sendCommand(packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED)
2720+
if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED)
27212721
return (false); //If command send fails then bail
27222722

27232723
checkUblox();
@@ -2739,7 +2739,7 @@ boolean SFE_UBLOX_GPS::getEsfIns(uint16_t maxWait)
27392739
packetCfg.len = 0;
27402740
packetCfg.startingSpot = 0;
27412741

2742-
if (sendCommand(packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED)
2742+
if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED)
27432743
return (false); //If command send fails then bail
27442744

27452745
checkUblox();
@@ -2772,7 +2772,7 @@ boolean SFE_UBLOX_GPS::getEsfDataInfo(uint16_t maxWait)
27722772
packetCfg.len = 0;
27732773
packetCfg.startingSpot = 0;
27742774

2775-
if (sendCommand(packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED)
2775+
if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED)
27762776
return (false); //If command send fails then bail
27772777

27782778
checkUblox();
@@ -2811,7 +2811,7 @@ boolean SFE_UBLOX_GPS::getEsfRawDataInfo(uint16_t maxWait)
28112811
packetCfg.len = 0;
28122812
packetCfg.startingSpot = 0;
28132813

2814-
if (sendCommand(packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED)
2814+
if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED)
28152815
return (false); //If command send fails then bail
28162816

28172817
checkUblox();
@@ -2831,7 +2831,7 @@ sfe_ublox_status_e SFE_UBLOX_GPS::getSensState(uint8_t sensor, uint16_t maxWait)
28312831
packetCfg.len = 0;
28322832
packetCfg.startingSpot = 0;
28332833

2834-
if (sendCommand(packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED)
2834+
if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED)
28352835
return (SFE_UBLOX_STATUS_FAIL); //If command send fails then bail
28362836

28372837
ubloxSen.numSens = extractByte(15);
@@ -2875,6 +2875,9 @@ boolean SFE_UBLOX_GPS::getVehAtt(uint16_t maxWait){
28752875
packetCfg.len = 0;
28762876
packetCfg.startingSpot = 0;
28772877

2878+
if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED)
2879+
return (SFE_UBLOX_STATUS_FAIL); //If command send fails then bail
2880+
28782881
checkUblox();
28792882

28802883
vehAtt.roll = extractLong(8);

0 commit comments

Comments
 (0)