Classes
Methods
(async) connect(options) → {Promise.<boolean>}
Connect to a GNSS receiver
Parameters:
Name | Type | Description |
---|---|---|
options | Object | Connection options |
- Source
Returns:
Whether connection was successful
- Type:
- Promise.<boolean>
(async) connectToSparkFunFacet(options) → {Promise.<boolean>}
Special connection method for SparkFun Facet RTK Rover
Parameters:
Name | Type | Description |
---|---|---|
options | Object | Connection options |
- Source
Returns:
Whether connection was successful
- Type:
- Promise.<boolean>
(async) disconnect()
Disconnect from the device
- Source
getConnectionInfo() → {Object}
Get connection status information
- Source
Returns:
Connection status
- Type:
- Object
handleIncomingData(event)
Handle incoming data from the device
Parameters:
Name | Type | Description |
---|---|---|
event | Event | Characteristic value changed event |
- Source
isDeviceConnected() → {boolean}
Check if device is connected
- Source
Returns:
Whether device is connected
- Type:
- boolean
(async) onDisconnected()
Handle device disconnection
- Source
(async) sendCommand(command) → {Promise.<boolean>}
Send a command to configure the device
Parameters:
Name | Type | Description |
---|---|---|
command | string | Command string |
- Source
Returns:
Whether command was sent successfully
- Type:
- Promise.<boolean>
(async) sendData(data) → {Promise.<boolean>}
Send data to the device
Parameters:
Name | Type | Description |
---|---|---|
data | string | | Data to send |
- Source
Returns:
Whether send was successful
- Type:
- Promise.<boolean>