Commit 7fb914a
authored
When an OD entry is found in SdoClient.upload(), the truncation is
currently skipped only for those types explicitly listed as variable
length data (domain, strings). That causes unknown types to be
truncated to whatever their length indicates, which is usually one
byte.
Invert the condition to check all types with an explicitly known size,
a.k.a. those listed in STRUCT_TYPES where the required length can be
deduced from the structure format.
Re-enable the unit tests which were skipped based on the previously
buggy behavior.
1 parent 7ddb19b commit 7fb914a
File tree
3 files changed
+7
-5
lines changed- canopen
- objectdictionary
- sdo
- test
3 files changed
+7
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
422 | 428 | | |
423 | 429 | | |
424 | 430 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
130 | | - | |
131 | | - | |
| 129 | + | |
132 | 130 | | |
133 | 131 | | |
134 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
814 | 814 | | |
815 | 815 | | |
816 | 816 | | |
817 | | - | |
818 | 817 | | |
819 | 818 | | |
820 | 819 | | |
| |||
829 | 828 | | |
830 | 829 | | |
831 | 830 | | |
832 | | - | |
833 | 831 | | |
834 | 832 | | |
835 | 833 | | |
| |||
0 commit comments