Skip to content
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

Fix objects that can have a NULL object id as attribute #40

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion src/network_management/network_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ impl NetworkManager {
self.get_control_function_address_by_name(destination.get_name()),
priority,
)
.unwrap_or(CanId::default());
.unwrap_or_default();

if message_id.raw() != CanId::default().raw() {
self.enqueue_can_message(
Expand Down
8 changes: 7 additions & 1 deletion src/object_pool/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pub mod colour;
pub mod reader;
pub mod writer;

mod object;
pub mod object;
mod object_attributes;
mod object_id;
mod object_pool;
Expand All @@ -12,11 +12,17 @@ mod vt_version;
use crate::network_management::name::NAME;

pub use colour::Colour;
pub use object_attributes::ObjectRef;
pub use object_id::NullableObjectId;
pub use object_id::ObjectId;
pub use object_pool::ObjectPool;
pub use object_type::ObjectType;

#[derive(Debug)]
pub enum ParseError {
DataEmpty,
UnknownObjectType,
UnexpectedNullObjectId,
BooleanOutOfRange,
UnsupportedVtVersion,
}
Loading
Loading