Skip to content

Merge Esp32 v2.0.1 Debug #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Nov 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 115 additions & 0 deletions .github/workflows/compile-sketch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: Compile Sketch

on:
- push
- pull_request


jobs:
compile-sketch:
runs-on: ubuntu-latest

strategy:
fail-fast: false

matrix:
board:
# Uno
# https://github.com/arduino/ArduinoCore-avr/blob/master/boards.txt
- fqbn: arduino:avr:uno
platforms: |
- name: arduino:avr
source-url: https://downloads.arduino.cc/packages/package_index.json

# ESP32
# https://github.com/espressif/arduino-esp32/blob/master/boards.txt
- fqbn: esp32:esp32:esp32
platforms: |
- name: esp32:esp32
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

# ESP32-S2
# https://github.com/espressif/arduino-esp32/blob/master/boards.txt
- fqbn: esp32:esp32:esp32s2
platforms: |
- name: esp32:esp32
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

# ESP32-C3
# https://github.com/espressif/arduino-esp32/blob/master/boards.txt
- fqbn: esp32:esp32:esp32c3
platforms: |
- name: esp32:esp32
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

# Artemis / Apollo3
# https://github.com/sparkfun/Arduino_Apollo3/blob/main/boards.txt
- fqbn: SparkFun:apollo3:sfe_artemis_atp
platforms: |
- name: SparkFun:apollo3
source-url: https://raw.githubusercontent.com/sparkfun/Arduino_Apollo3/master/package_sparkfun_apollo3_index.json

# ESP8266
# https://github.com/esp8266/Arduino/blob/master/boards.txt
- fqbn: esp8266:esp8266:thingdev
platforms: |
- name: esp8266:esp8266
source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json

# SAMD21
# https://github.com/arduino/ArduinoCore-samd/blob/master/boards.txt
- fqbn: arduino:samd:mkr1000
platforms: |
- name: arduino:samd
# source-url: https://downloads.arduino.cc/packages/package_index.json

# Nano BLE 33 / nRF52840
# https://github.com/arduino/ArduinoCore-mbed/blob/master/boards.txt
- fqbn: arduino:mbed:nano33ble
platforms: |
- name: arduino:mbed
# source-url: https://downloads.arduino.cc/packages/package_index.json

# RP2040
# https://github.com/arduino/ArduinoCore-mbed/blob/master/boards.txt
- fqbn: rp2040:rp2040:sparkfun_promicrorp2040
platforms: |
- name: rp2040:rp2040
source-url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json

# STM32
# https://github.com/arduino/ArduinoCore-mbed/blob/master/boards.txt
- fqbn: STMicroelectronics:stm32:GenF1
platforms: |
- name: STMicroelectronics:stm32
source-url: https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Compile Sketch
uses: arduino/compile-sketches@v1
with:
platforms: ${{ matrix.board.platforms }}
fqbn: ${{ matrix.board.fqbn }}
libraries: |
- source-url: https://github.com/${{github.repository}}.git
sketch-paths: |
- examples/Example10_AltitudeMSL
- examples/Example11_ResetModule/Example1_FactoryDefaultviaI2C
- examples/Example13_PVT/Example1_AutoPVT
- examples/Example13_PVT/Example2_AutoPVT_ExplicitUpdate
- examples/Example14_DebugOutput
- examples/Example15_GetDateTime
- examples/Example16_Nanosecond_MaxOutput
- examples/Example16_PartialSecond_MaxOutput
- examples/Example18_PowerSaveMode
- examples/Example19_DynamicModel
- examples/Example20_SendCustomCommand
enable-warnings-report: true
# verbose: true

# outputs:
# report-artifact-name: ${{ steps.report-artifact-name.outputs.report-artifact-name }}

Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
#include <SparkFun_u-blox_GNSS_Arduino_Library.h> //http://librarymanager/All#SparkFun_u-blox_GNSS
SFE_UBLOX_GNSS myGNSS;

boolean usingAutoHNRAtt = false;
boolean usingAutoHNRDyn = false;
boolean usingAutoHNRPVT = false;
bool usingAutoHNRAtt = false;
bool usingAutoHNRDyn = false;
bool usingAutoHNRPVT = false;

void setup()
{
Expand Down
2 changes: 1 addition & 1 deletion examples/Example17_Geofence/Example17_Geofence.ino
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ void loop()
{
geofenceState currentGeofenceState; // Create storage for the geofence state

boolean result = myGNSS.getGeofenceState(currentGeofenceState);
bool result = myGNSS.getGeofenceState(currentGeofenceState);

Serial.print(F("getGeofenceState returned: ")); // Print the combined state
Serial.print(result); // Get the geofence state
Expand Down
4 changes: 2 additions & 2 deletions examples/Example21_ModuleInfo/Example21_ModuleInfo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
class SFE_UBLOX_GPS_ADD : public SFE_UBLOX_GNSS
{
public:
boolean getModuleInfo(uint16_t maxWait = 1100); //Queries module, texts
bool getModuleInfo(uint16_t maxWait = 1100); //Queries module, texts

struct minfoStructure // Structure to hold the module info (uses 341 bytes of RAM)
{
Expand Down Expand Up @@ -115,7 +115,7 @@ void loop()
{
}

boolean SFE_UBLOX_GPS_ADD::getModuleInfo(uint16_t maxWait)
bool SFE_UBLOX_GPS_ADD::getModuleInfo(uint16_t maxWait)
{
myGNSS.minfo.hwVersion[0] = 0;
myGNSS.minfo.swVersion[0] = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@

#include <SoftwareSerial.h>

#define mySerial Serial1 // Uncomment this line to connect via Serial1
//#define mySerial Serial1 // Uncomment this line to connect via Serial1
// - or -
//SoftwareSerial mySerial(10, 11); // Uncomment this line to connect via SoftwareSerial(RX, TX). Connect pin 10 to GNSS TX pin.
// - or -
#define mySerial Serial // Uncomment this line if you just want to keep using Serial

#include <SparkFun_u-blox_GNSS_Arduino_Library.h> //http://librarymanager/All#SparkFun_u-blox_GNSS
SFE_UBLOX_GNSS myGNSS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void setup()
myGNSS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise)
myGNSS.saveConfiguration(); //Save the current settings to flash and BBR

boolean response = true;
bool response = true;
response &= myGNSS.enableRTCMmessage(UBX_RTCM_1005, COM_PORT_I2C, 1); //Enable message 1005 to output through I2C port, message every second
response &= myGNSS.enableRTCMmessage(UBX_RTCM_1077, COM_PORT_I2C, 1);
response &= myGNSS.enableRTCMmessage(UBX_RTCM_1087, COM_PORT_I2C, 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void setup()
Serial.println(F("Press any key to send commands to begin Survey-In"));
while (Serial.available() == 0) ; //Wait for user to press a key

boolean response;
bool response;

//Check if Survey is in Progress before initiating one
// From v2.0, the data from getSurveyStatus (UBX-NAV-SVIN) is returned in UBX_NAV_SVIN_t packetUBXNAVSVIN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void setup()
// Please see u-blox_structs.h for the full definition of UBX_NAV_SVIN_t
// You can either read the data from packetUBXNAVSVIN directly
// or can use the helper functions: getSurveyInActive; getSurveyInValid; getSurveyInObservationTime; and getSurveyInMeanAccuracy
boolean response;
bool response;
response = myGNSS.getSurveyStatus(2000); //Query module for SVIN status with 2000ms timeout (request can take a long time)
if (response == false)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void setup()

myGNSS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise)

boolean success = true;
bool success = true;

//-1280208.308,-4716803.847,4086665.811 is SparkFun HQ so...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void setup()
Serial.println(F("Press any key to send commands to begin Survey-In"));
while (Serial.available() == 0) ; //Wait for user to press a key

boolean response = true;
bool response = true;
response &= myGNSS.enableRTCMmessage(UBX_RTCM_1005, COM_PORT_I2C, 1); //Enable message 1005 to output through I2C port, message every second
response &= myGNSS.enableRTCMmessage(UBX_RTCM_1074, COM_PORT_I2C, 1);
response &= myGNSS.enableRTCMmessage(UBX_RTCM_1084, COM_PORT_I2C, 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void setup()
myGNSS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX sentences (turn off NMEA noise)
myGNSS.saveConfigSelective(VAL_CFG_SUBSEC_IOPORT); //Save the communications port settings to flash and BBR

boolean response = true;
bool response = true;
response &= myGNSS.enableRTCMmessage(UBX_RTCM_1005, COM_PORT_I2C, 1); //Enable message 1005 to output through I2C port, message every second
response &= myGNSS.enableRTCMmessage(UBX_RTCM_1074, COM_PORT_I2C, 1);
response &= myGNSS.enableRTCMmessage(UBX_RTCM_1084, COM_PORT_I2C, 1);
Expand Down
2 changes: 2 additions & 0 deletions keywords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ setI2CpollingWait KEYWORD2
setSPIpollingWait KEYWORD2
setI2CTransactionSize KEYWORD2
getI2CTransactionSize KEYWORD2
setI2cStopRestart KEYWORD2
getI2cStopRestart KEYWORD2
setSpiTransactionSize KEYWORD2
getSpiTransactionSize KEYWORD2
setMaxNMEAByteCount KEYWORD2
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=SparkFun u-blox GNSS Arduino Library
version=2.0.17
version=2.0.18
author=SparkFun Electronics <[email protected]>
maintainer=SparkFun Electronics <sparkfun.com>
sentence=Library for I2C and Serial Communication with u-blox GNSS modules<br/><br/>
Expand Down
Loading