mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 05:15:25 +03:00
check for core.gpsport nullpointer first
This commit is contained in:
parent
d002f0fdc1
commit
fc1f5c9f1e
2 changed files with 2675 additions and 2673 deletions
5342
obj/baseflight.hex
5342
obj/baseflight.hex
File diff suppressed because it is too large
Load diff
|
@ -160,8 +160,10 @@ void gpsInitHardware(void)
|
||||||
void gpsThread(void)
|
void gpsThread(void)
|
||||||
{
|
{
|
||||||
// read out available GPS bytes
|
// read out available GPS bytes
|
||||||
while (serialTotalBytesWaiting(core.gpsport))
|
if (core.gpsport) {
|
||||||
gpsNewData(serialRead(core.gpsport));
|
while (serialTotalBytesWaiting(core.gpsport))
|
||||||
|
gpsNewData(serialRead(core.gpsport));
|
||||||
|
}
|
||||||
|
|
||||||
switch (gpsData.state) {
|
switch (gpsData.state) {
|
||||||
case GPS_UNKNOWN:
|
case GPS_UNKNOWN:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue