Skip to content

Commit beea5f5

Browse files
authored
Merge pull request #7 from sparkfun/v1.0.4
Update SparkFun_I2C_GPS_Arduino_Library.cpp
2 parents 4275e2c + 8a9625f commit beea5f5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/SparkFun_I2C_GPS_Arduino_Library.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,11 @@ string I2CGPS::createMTKpacket(uint16_t packetType, string dataField)
251251
configSentence += "0";
252252
if (packetType < 10)
253253
configSentence += "0";
254+
#if defined (ARDUINO)
255+
configSentence += String(packetType);
256+
#elif defined (__MBED__)
254257
configSentence += to_string(packetType);
258+
#endif
255259

256260
//Attach any settings
257261
if (dataField.length() > 0)
@@ -335,7 +339,11 @@ string I2CGPS::createPGCMDpacket(uint16_t packetType, string dataField)
335339
configSentence += "0";
336340
if (packetType < 10)
337341
configSentence += "0";
342+
#if defined (ARDUINO)
343+
configSentence += String(packetType);
344+
#elif defined (__MBED__)
338345
configSentence += to_string(packetType);
346+
#endif
339347

340348
//Attach any settings
341349
if (dataField.length() > 0)

0 commit comments

Comments
 (0)