Skip to content

Commit

Permalink
use is_remote_frame
Browse files Browse the repository at this point in the history
  • Loading branch information
TaKO8Ki committed Apr 26, 2023
1 parent a08d0bf commit dbb684a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,13 @@ impl SourceReader for CANSourceReader {

impl CANSourceReader {
fn can_frame_into_row(&self, frame: CanFrame) -> Result<SourceRow> {
if frame.is_rtr() {
if frame.is_remote_frame() {
unimplemented!("RTR (remote transmission request) frames are not supported");
} else if frame.is_extended() {
unimplemented!("Extended frame format is not supported");
} else if frame.is_error_frame() {
Err(SpringError::ForeignIo {
source: anyhow!("got a error CAN frame (CAN ID: {})", frame.id()),
source: anyhow!("got a error CAN frame (CAN ID: {:?})", frame.id()),
foreign_info: ForeignInfo::SocketCAN(self.interface.clone()),
})
} else {
Expand Down

0 comments on commit dbb684a

Please sign in to comment.