Skip to content

Commit 380277a

Browse files
authored
Update sfe_bus.cpp for Particle Platform
I haven't done much platform porting so I'm not exactly sure the most correct way to fix this, but casting data uint8_t* to char* resolves the compiler error: invalid conversion from 'uint8_t*' {aka 'unsigned char*'} to 'char*' I would guess the right next step is to dig into DeviceOS serial handling but maybe someone can comment. If this is an acceptable solution, or if it's safe to cast to char * for all platforms I'd like to see it merge into main so I don't have to remember it in the future.
1 parent b7bb3db commit 380277a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/sfe_bus.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,10 @@ namespace SparkFun_UBLOX_GNSS
464464

465465
if (length == 0)
466466
return 0;
467-
467+
#ifdef PARTICLE
468+
return _serialPort->readBytes((char *)data, length);
469+
#else
468470
return _serialPort->readBytes(data, length);
471+
#endif
469472
}
470473
}

0 commit comments

Comments
 (0)