Fix more compiler warnings
This commit is contained in:
@@ -27,9 +27,6 @@ jobs:
|
|||||||
platforms: |
|
platforms: |
|
||||||
- name: esp32:esp32
|
- name: esp32:esp32
|
||||||
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
|
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
|
||||||
env: |
|
|
||||||
- CS: 1
|
|
||||||
- LED_BUILTIN: 13
|
|
||||||
|
|
||||||
# ESP32-S2
|
# ESP32-S2
|
||||||
# https://github.com/espressif/arduino-esp32/blob/master/boards.txt
|
# https://github.com/espressif/arduino-esp32/blob/master/boards.txt
|
||||||
@@ -37,9 +34,6 @@ jobs:
|
|||||||
platforms: |
|
platforms: |
|
||||||
- name: esp32:esp32
|
- name: esp32:esp32
|
||||||
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
|
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
|
||||||
env: |
|
|
||||||
- CS: 1
|
|
||||||
- LED_BUILTIN: 13
|
|
||||||
|
|
||||||
# ESP32-C3
|
# ESP32-C3
|
||||||
# https://github.com/espressif/arduino-esp32/blob/master/boards.txt
|
# https://github.com/espressif/arduino-esp32/blob/master/boards.txt
|
||||||
@@ -47,9 +41,6 @@ jobs:
|
|||||||
platforms: |
|
platforms: |
|
||||||
- name: esp32:esp32
|
- name: esp32:esp32
|
||||||
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
|
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
|
||||||
env: |
|
|
||||||
- CS: 1
|
|
||||||
- LED_BUILTIN: 13
|
|
||||||
|
|
||||||
# Artemis / Apollo3
|
# Artemis / Apollo3
|
||||||
# https://github.com/sparkfun/Arduino_Apollo3/blob/main/boards.txt
|
# https://github.com/sparkfun/Arduino_Apollo3/blob/main/boards.txt
|
||||||
@@ -64,8 +55,6 @@ jobs:
|
|||||||
platforms: |
|
platforms: |
|
||||||
- name: esp8266:esp8266
|
- name: esp8266:esp8266
|
||||||
source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json
|
source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json
|
||||||
env: |
|
|
||||||
- CS: 1
|
|
||||||
|
|
||||||
# SAMD21
|
# SAMD21
|
||||||
# https://github.com/arduino/ArduinoCore-samd/blob/master/boards.txt
|
# https://github.com/arduino/ArduinoCore-samd/blob/master/boards.txt
|
||||||
@@ -115,7 +104,6 @@ jobs:
|
|||||||
- examples/Example15_GetDateTime
|
- examples/Example15_GetDateTime
|
||||||
- examples/Example16_Nanosecond_MaxOutput
|
- examples/Example16_Nanosecond_MaxOutput
|
||||||
- examples/Example16_PartialSecond_MaxOutput
|
- examples/Example16_PartialSecond_MaxOutput
|
||||||
- examples/Example17_Geofence
|
|
||||||
- examples/Example18_PowerSaveMode
|
- examples/Example18_PowerSaveMode
|
||||||
- examples/Example19_DynamicModel
|
- examples/Example19_DynamicModel
|
||||||
- examples/Example20_SendCustomCommand
|
- examples/Example20_SendCustomCommand
|
||||||
|
|||||||
@@ -1650,7 +1650,7 @@ void SFE_UBLOX_GNSS::processRTCMframe(uint8_t incoming)
|
|||||||
//Bytes can be piped to Serial or other interface. The consumer could be a radio or the internet (Ntrip broadcaster)
|
//Bytes can be piped to Serial or other interface. The consumer could be a radio or the internet (Ntrip broadcaster)
|
||||||
void SFE_UBLOX_GNSS::processRTCM(uint8_t incoming)
|
void SFE_UBLOX_GNSS::processRTCM(uint8_t incoming)
|
||||||
{
|
{
|
||||||
uint8_t ignoreMe = incoming; // Do something with incoming just to get rid of the pesky compiler warning!
|
uint8_t ignoreMe = incoming; ignoreMe += 0; // Do something with incoming just to get rid of the pesky compiler warning!
|
||||||
|
|
||||||
//Radio.sendReliable((String)incoming); //An example of passing this byte to a radio
|
//Radio.sendReliable((String)incoming); //An example of passing this byte to a radio
|
||||||
|
|
||||||
@@ -2934,7 +2934,7 @@ sfe_ublox_status_e SFE_UBLOX_GNSS::sendCommand(ubxPacket *outgoingUBX, uint16_t
|
|||||||
//Returns false if sensor fails to respond to I2C traffic
|
//Returns false if sensor fails to respond to I2C traffic
|
||||||
sfe_ublox_status_e SFE_UBLOX_GNSS::sendI2cCommand(ubxPacket *outgoingUBX, uint16_t maxWait)
|
sfe_ublox_status_e SFE_UBLOX_GNSS::sendI2cCommand(ubxPacket *outgoingUBX, uint16_t maxWait)
|
||||||
{
|
{
|
||||||
uint16_t ignoreMe = maxWait; // Do something with maxWait just to avoid the pesky compiler warnings!
|
uint16_t ignoreMe = maxWait; ignoreMe += 0; // Do something with maxWait just to avoid the pesky compiler warnings!
|
||||||
|
|
||||||
// From the integration guide:
|
// From the integration guide:
|
||||||
// "The receiver does not provide any write access except for writing UBX and NMEA messages to the
|
// "The receiver does not provide any write access except for writing UBX and NMEA messages to the
|
||||||
@@ -3182,6 +3182,12 @@ void SFE_UBLOX_GNSS::sendSpiCommand(ubxPacket *outgoingUBX)
|
|||||||
//Pretty prints the current ubxPacket
|
//Pretty prints the current ubxPacket
|
||||||
void SFE_UBLOX_GNSS::printPacket(ubxPacket *packet, bool alwaysPrintPayload)
|
void SFE_UBLOX_GNSS::printPacket(ubxPacket *packet, bool alwaysPrintPayload)
|
||||||
{
|
{
|
||||||
|
// Only print the payload is ignoreThisPayload is false otherwise
|
||||||
|
// we could be printing gibberish from beyond the end of packetBuf
|
||||||
|
// (These two lines get rid of a pesky compiler warning)
|
||||||
|
bool printPayload = (ignoreThisPayload == false);
|
||||||
|
printPayload |= (alwaysPrintPayload == true);
|
||||||
|
|
||||||
#ifndef SFE_UBLOX_REDUCED_PROG_MEM
|
#ifndef SFE_UBLOX_REDUCED_PROG_MEM
|
||||||
if (_printDebug == true)
|
if (_printDebug == true)
|
||||||
{
|
{
|
||||||
@@ -3216,9 +3222,7 @@ void SFE_UBLOX_GNSS::printPacket(ubxPacket *packet, bool alwaysPrintPayload)
|
|||||||
_debugSerial->print(F(" Len: 0x"));
|
_debugSerial->print(F(" Len: 0x"));
|
||||||
_debugSerial->print(packet->len, HEX);
|
_debugSerial->print(packet->len, HEX);
|
||||||
|
|
||||||
// Only print the payload is ignoreThisPayload is false otherwise
|
if (printPayload)
|
||||||
// we could be printing gibberish from beyond the end of packetBuf
|
|
||||||
if ((alwaysPrintPayload == true) || (ignoreThisPayload == false))
|
|
||||||
{
|
{
|
||||||
_debugSerial->print(F(" Payload:"));
|
_debugSerial->print(F(" Payload:"));
|
||||||
|
|
||||||
@@ -3234,6 +3238,12 @@ void SFE_UBLOX_GNSS::printPacket(ubxPacket *packet, bool alwaysPrintPayload)
|
|||||||
}
|
}
|
||||||
_debugSerial->println();
|
_debugSerial->println();
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
if (_printDebug == true)
|
||||||
|
{
|
||||||
|
_debugSerial->print(F("Len: 0x"));
|
||||||
|
_debugSerial->print(packet->len, HEX);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4297,12 +4307,15 @@ void SFE_UBLOX_GNSS::setSerialRate(uint32_t baudrate, uint8_t uartPort, uint16_t
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
sfe_ublox_status_e retVal = sendCommand(&packetCfg, maxWait);
|
sfe_ublox_status_e retVal = sendCommand(&packetCfg, maxWait);
|
||||||
|
|
||||||
#ifndef SFE_UBLOX_REDUCED_PROG_MEM
|
#ifndef SFE_UBLOX_REDUCED_PROG_MEM
|
||||||
if (_printDebug == true)
|
if (_printDebug == true)
|
||||||
{
|
{
|
||||||
_debugSerial->print(F("setSerialRate: sendCommand returned: "));
|
_debugSerial->print(F("setSerialRate: sendCommand returned: "));
|
||||||
_debugSerial->println(statusString(retVal));
|
_debugSerial->println(statusString(retVal));
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
(void)retVal; // Get rid of a pesky compiler warning!
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10740,7 +10753,7 @@ uint16_t SFE_UBLOX_GNSS::getMagAcc(uint16_t maxWait)
|
|||||||
// getGeoidSeparation is currently redundant. The geoid separation seems to only be provided in NMEA GGA and GNS messages.
|
// getGeoidSeparation is currently redundant. The geoid separation seems to only be provided in NMEA GGA and GNS messages.
|
||||||
int32_t SFE_UBLOX_GNSS::getGeoidSeparation(uint16_t maxWait)
|
int32_t SFE_UBLOX_GNSS::getGeoidSeparation(uint16_t maxWait)
|
||||||
{
|
{
|
||||||
uint16_t ignoreMe = maxWait; // Do something with maxWait just to get rid of the pesky compiler warning
|
uint16_t ignoreMe = maxWait; ignoreMe += 0; // Do something with maxWait just to get rid of the pesky compiler warning
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user