Skip to content

Commit

Permalink
Merge pull request #81 from mike7c2/master
Browse files Browse the repository at this point in the history
Fix boolean message member code generation
  • Loading branch information
pavel-kirienko authored Feb 3, 2019
2 parents c552466 + 08286a3 commit 907f957
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dsdl_compiler/libcanard_dsdl_compiler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def type_to_c_type(t):
'post_cpp_type':'',
'cpp_type_comment':'bit len %d' % (t.bitlen, ),
'bitlen':t.bitlen,
'max_size':get_max_size(t.bitlen, False),
'max_size':get_max_size(t.bitlen, True),
'signedness':signedness,
'saturate':saturate}
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#endif

#ifndef CANARD_INTERNAL_SATURATE_UNSIGNED
#define CANARD_INTERNAL_SATURATE_UNSIGNED(x, max) ( ((x) > max) ? max : (x) );
#define CANARD_INTERNAL_SATURATE_UNSIGNED(x, max) ( ((x) >= max) ? max : (x) );
#endif

#if defined(__GNUC__)
Expand Down

0 comments on commit 907f957

Please sign in to comment.