You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 28, 2021. It is now read-only.
constuint8_t UBX_RTCM_1230 = 0xE6; //GLONASS code-phase biases, set to once every 10 seconds
116
-
constuint8_t UBX_RTCM_I2C_PORT = 0;
117
-
constuint8_t UBX_RTCM_UART1_PORT = 1;
118
-
constuint8_t UBX_RTCM_UART2_PORT = 2;
119
-
constuint8_t UBX_RTCM_USB_PORT = 3;
120
-
constuint8_t UBX_RTCM_SPI_PORT = 4;
121
116
122
117
constuint8_t UBX_ACK_NACK = 0x00;
123
118
constuint8_t UBX_ACK_ACK = 0x01;
124
119
120
+
//The folloing consts are used to configure the various ports and streams for those ports. See -CFG-PRT.
121
+
constuint8_t COM_PORT_I2C = 0;
122
+
constuint8_t COM_PORT_UART1 = 1;
123
+
constuint8_t COM_PORT_UART2 = 2;
124
+
constuint8_t COM_PORT_USB = 3;
125
+
constuint8_t COM_PORT_SPI = 4;
126
+
127
+
constuint8_t COM_TYPE_UBX = (1<<0);
128
+
constuint8_t COM_TYPE_NMEA = (1<<1);
129
+
constuint8_t COM_TYPE_RTCM3 = (1<<5);
130
+
131
+
125
132
#defineMAX_PAYLOAD_SIZE64//Some commands are larger than 64 bytes but this covers most
126
133
127
134
//-=-=-=-=- UBX binary specific variables
@@ -177,6 +184,18 @@ class SFE_UBLOX_GPS
177
184
boolean getSurveyStatus(uint16_t maxWait); //Reads survey in status and sets the global variables
178
185
boolean enableRTCMmessage(uint8_t messageNumber, uint8_t portID, uint8_t secondsBetweenMessages, uint16_t maxWait = 250); //Given a message number turns on a message ID for output over given PortID
179
186
boolean disableRTCMmessage(uint8_t messageNumber, uint8_t portID, uint16_t maxWait = 250); //Turn off given RTCM message from a given port
187
+
188
+
boolean setPortOutput(uint8_t portID, uint8_t comSettings, uint16_t maxWait = 250); //Configure a given port to output UBX, NMEA, RTCM3 or a combination thereof
189
+
boolean setPortInput(uint8_t portID, uint8_t comSettings, uint16_t maxWait = 250); //Configure a given port to input UBX, NMEA, RTCM3 or a combination thereof
190
+
191
+
boolean setI2COutput(uint8_t comSettings, uint16_t maxWait = 250); //Configure I2C port to output UBX, NMEA, RTCM3 or a combination thereof
192
+
boolean setUART1Output(uint8_t comSettings, uint16_t maxWait = 250); //Configure UART1 port to output UBX, NMEA, RTCM3 or a combination thereof
193
+
boolean setUART2Output(uint8_t comSettings, uint16_t maxWait = 250); //Configure UART2 port to output UBX, NMEA, RTCM3 or a combination thereof
194
+
boolean setUSBOutput(uint8_t comSettings, uint16_t maxWait = 250); //Configure USB port to output UBX, NMEA, RTCM3 or a combination thereof
195
+
boolean setSPIOutput(uint8_t comSettings, uint16_t maxWait = 250); //Configure SPI port to output UBX, NMEA, RTCM3 or a combination thereof
196
+
197
+
boolean setNavigationFrequency(uint8_t navFreq, uint16_t maxWait = 250); //Set the number of nav solutions sent per second
198
+
180
199
boolean setRTCMport(uint8_t portID, boolean enableRTCM3, uint16_t maxWait = 250); //Enable/Disable RTCM3 (both input and output) for a given port
181
200
182
201
boolean getPortSettings(uint8_t portID, uint16_t maxWait = 250); //Returns the current protocol bits in the UBX-CFG-PRT command for a given port
@@ -240,6 +259,7 @@ class SFE_UBLOX_GPS
240
259
241
260
//Functions
242
261
uint32_textractLong(uint8_t spotToStart); //Combine four bytes from payload into long
262
+
uint16_textractInt(uint8_t spotToStart); //Combine two bytes from payload into int
243
263
uint8_textractByte(uint8_t spotToStart); //Get byte from payload
244
264
voidaddToChecksum(uint8_t incoming); //Given an incoming byte, adjust rollingChecksumA/B
0 commit comments