Skip to content

Commit

Permalink
adds error term - analog offset array too short
Browse files Browse the repository at this point in the history
  • Loading branch information
cvhammond committed Aug 27, 2023
1 parent eeda266 commit ca7509a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ impl Data {
col *= parameters.analog.scale[i];
}
} else {
return Err(C3dParseError::AnalogOffsetScaleMismatch);
return Err(C3dParseError::InsufficientAnalogOffsets);
}
self.analog = analog_data * parameters.analog.gen_scale;
Ok(self)
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ pub enum C3dParseError {
InvalidData(String),
InvalidParameterFormat(String),
AnalogOffsetScaleMismatch,
InsufficientAnalogOffsets,
}

impl Error for C3dParseError {}
Expand Down

0 comments on commit ca7509a

Please sign in to comment.