-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite large parts from the original driver to make the code more understandable, maintainable, document more items, move related things into their own files and make the code more consistent.
- Loading branch information
1 parent
ddd9d58
commit 8b31220
Showing
16 changed files
with
2,660 additions
and
1,228 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
# This message is used to dump the raw gps communication to the log. | ||
# Set the parameter GPS_DUMP_COMM to 1 to use this. | ||
|
||
uint64 timestamp # time since system start (microseconds) | ||
uint64 timestamp # time since system start (microseconds) | ||
|
||
uint8 instance # Instance of GNSS receiver | ||
|
||
uint8 len # length of data, MSB bit set = message to the gps device, | ||
# clear = message from the device | ||
uint8[79] data # data to write to the log | ||
uint8 instance # Instance of GNSS receiver | ||
uint8 len # length of data, MSB bit set = message to the gps device, | ||
# clear = message from the device | ||
uint8[79] data # data to write to the log | ||
|
||
uint8 ORB_QUEUE_LENGTH = 8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Septentrio GNSS Driver | ||
|
||
## SBF Library | ||
|
||
The `sbf/` directory contains all the logic required to work with SBF, including message | ||
definitions, block IDs and a simple parser for the messages used by PX4. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/**************************************************************************** | ||
* | ||
* Copyright (c) 2024 PX4 Development Team. All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions | ||
* are met: | ||
* | ||
* 1. Redistributions of source code must retain the above copyright | ||
* notice, this list of conditions and the following disclaimer. | ||
* 2. Redistributions in binary form must reproduce the above copyright | ||
* notice, this list of conditions and the following disclaimer in | ||
* the documentation and/or other materials provided with the | ||
* distribution. | ||
* 3. Neither the name PX4 nor the names of its contributors may be | ||
* used to endorse or promote products derived from this software | ||
* without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | ||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS | ||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED | ||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | ||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
* POSSIBILITY OF SUCH DAMAGE. | ||
* | ||
****************************************************************************/ | ||
|
||
/** | ||
* @file module.h | ||
* | ||
* Module functionality for the Septentrio GNSS driver. | ||
* | ||
* @author Thomas Frans | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <px4_platform_common/log.h> | ||
|
||
#ifdef DEBUG_BUILD | ||
#ifndef SEP_LOG_ERROR | ||
#define SEP_LOG_ERROR | ||
#endif | ||
#ifndef SEP_LOG_WARN | ||
#define SEP_LOG_WARN | ||
#endif | ||
#ifndef SEP_LOG_INFO | ||
#define SEP_LOG_INFO | ||
#endif | ||
#endif | ||
|
||
#ifdef SEP_LOG_ERROR | ||
#define SEP_ERR(...) {PX4_WARN(__VA_ARGS__);} | ||
#else | ||
#define SEP_ERR(...) {} | ||
#endif | ||
|
||
#ifdef SEP_LOG_WARN | ||
#define SEP_WARN(...) {PX4_WARN(__VA_ARGS__);} | ||
#else | ||
#define SEP_WARN(...) {} | ||
#endif | ||
|
||
#ifdef SEP_LOG_INFO | ||
#define SEP_INFO(...) {PX4_INFO(__VA_ARGS__);} | ||
#else | ||
#define SEP_INFO(...) {} | ||
#endif | ||
|
||
#ifdef SEP_LOG_TRACE_PARSING | ||
#define SEP_TRACE_PARSING(...) {PX4_DEBUG(__VA_ARGS__);} | ||
#else | ||
#define SEP_TRACE_PARSING(...) {} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.