Add GPS message types, consolidate SBG messages, create common messag… #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes significant changes to the
src/command.rs
,src/lib.rs
, andsrc/sensor.rs
files, as well as an update to theCargo.toml
file. The changes primarily focus on restructuring the message and sensor data handling, adding new message types, and removing redundant code.Restructuring message and sensor data handling:
src/lib.rs
: IntroducedRadioMessage
andCanMessage
structs to differentiate between radio and CAN messages, and addedRadioData
andCanData
enums to encapsulate different types of data. [1] [2]Adding new message types:
src/sensor.rs
: Added a comprehensive list of new GPS message types under theGps
enum, leveraging theublox
crate for various GPS data references.src/sensor.rs
: Simplified and combined existing sensor data structures, such as mergingEkfNav1
andEkfNav2
intoEkfNav
, andImu1
andImu2
intoImu
. [1] [2] [3]Removing redundant code:
src/command.rs
: Removed theCommandData
struct and itsnew
method, simplifying theCommand
enum. [1] [2]src/sensor.rs
: Removed theSensor
struct and itsnew
method, along with other unused sensor data structures.Dependency updates:
Cargo.toml
: Added theublox
crate withserde
feature for handling GPS data.These changes streamline the codebase, improve message handling, and enhance the flexibility for future expansions.