Skip to content

Commit

Permalink
Merge pull request #186 from frankjannis/main
Browse files Browse the repository at this point in the history
Offset calculation is multiplicative in GenICam + Default for increment in Integer Nodes
  • Loading branch information
bschwind authored Sep 28, 2024
2 parents bdabf42 + 67167c6 commit a746684
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion genapi/src/elem_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ impl RegPIndex {
let base = self.p_index.value(device, store, cx)?;
if let Some(offset) = &self.offset {
let offset: i64 = offset.value(device, store, cx)?;
Ok(base + offset)
Ok(base * offset)
} else {
Ok(base)
}
Expand Down
2 changes: 1 addition & 1 deletion genapi/src/parser/integer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl Parse for IntegerNode {
let inc = node
.parse_if(INC, node_builder, value_builder, cache_builder)
.or_else(|| node.parse_if(P_INC, node_builder, value_builder, cache_builder))
.unwrap_or(ImmOrPNode::Imm(10));
.unwrap_or(ImmOrPNode::Imm(1));
let unit = node.parse_if(UNIT, node_builder, value_builder, cache_builder);
let representation: IntegerRepresentation = node
.parse_if(REPRESENTATION, node_builder, value_builder, cache_builder)
Expand Down

0 comments on commit a746684

Please sign in to comment.