This repository was archived by the owner on Dec 1, 2020. It is now read-only.
Commit 2f15f77
Fix/pm 229/rewrite pdo mapping (#192)
* Check in the write method of the SDO if an error is received, if so; a ros fatal message will be initiated.
* Fixed clang format.
* Fixed clang format. (now really)
* fixed indent errors.
* fixed clang format. (NOW REALLY)
* fixed clang format. ( NOW REALLY (really) )
* Removed the global variable.
It was a redundant decleration.
* removed new line.
* added the rwc cariable to .h file
* removed rwc
* added type to the rwc.
* PDO map is configured using the example given in the IMC manual. Also short docstrings have been added to improve readability.
* Added the reactivation of the sync manager, otherswise the slave would send an error.
This version of the PDO-mapping is a working but roughly written code. Has to be cleaned before merging.
* Updated layout to match the clang8 format.
* fixed byteOffset list.
This was necessary because the byteOffset of the next object was given to the currently handled object.
* Fixed clang8 format
* Removed print statement optimized code to a better readable format.
* Updated format to match the cpp style guide
* Removed the factor group values.
These were unused, the denominator and nominator were both 1.
* Rewritten the code to a more sustainable and readable structure.
Used the cpp style guide to set a certain standard for future refactor/rewriting of code. (this includes all olav his comments made on the PR)
* Added the constructor of the IMCObject because an error occurred when it was removed.
* Added lint ignores and utility.
* fixed format errors
* Removed the test for maximum amount.
Because it is not possible with the currently defined IMC PDO Objects.
* Set the ethercat communication error protocol using the 6007 register.
This is necessary to handle an possible ethercat connection loss.
* Updated the comments in the PDO map and edited the for loop condition of the unused PDO registers to match the if condition.
* Edit naming convention to match google cpp style guide.
* Changed the for loop and if condition for disabling the unused PDO registers.
* removed compare operator from the if statement and removed redundant variable from function.
* Fixed the if condition.
This if statement should be entered if one of the values returns 0. Previously it would enter if all the values are correct.
* Changed PDO_objects unordered map back to a normal map, otherwise it wont work!!!!
Also changed some last format styling
* Moved function of combining address to calculate when the object is created.
A separate function is redundant because every object needs this variable.
* Changed to const reference to avoid copying each pair in the for each loop.
Co-authored-by: martijnvandermarel <martijn.vander.marel@hetnet.nl>
Co-authored-by: Roelemans <47626418+Roelemans@users.noreply.github.com>
Co-authored-by: Olav de Haas <olavh@protonmail.com>1 parent bb25ac7 commit 2f15f77
File tree
6 files changed
+177
-179
lines changed- march_hardware
- include/march_hardware
- EtherCAT
- src
- EtherCAT
- test
6 files changed
+177
-179
lines changedLines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | | - | |
19 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
20 | 23 | | |
21 | | - | |
| 24 | + | |
22 | 25 | | |
23 | | - | |
24 | | - | |
25 | | - | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | | - | |
28 | | - | |
| 29 | + | |
29 | 30 | | |
| 31 | + | |
| 32 | + | |
30 | 33 | | |
31 | 34 | | |
| 35 | + | |
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
36 | 40 | | |
37 | 41 | | |
38 | | - | |
| 42 | + | |
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
| |||
57 | 61 | | |
58 | 62 | | |
59 | 63 | | |
60 | | - | |
61 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
62 | 68 | | |
63 | | - | |
64 | | - | |
| 69 | + | |
65 | 70 | | |
66 | 71 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
78 | 85 | | |
79 | 86 | | |
80 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
22 | 28 | | |
23 | 29 | | |
24 | 30 | | |
25 | 31 | | |
26 | 32 | | |
27 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
28 | 40 | | |
29 | 41 | | |
30 | 42 | | |
31 | 43 | | |
32 | 44 | | |
33 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
34 | 52 | | |
35 | | - | |
36 | 53 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
81 | 79 | | |
82 | 80 | | |
83 | 81 | | |
84 | 82 | | |
85 | 83 | | |
86 | 84 | | |
87 | 85 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
| 86 | + | |
97 | 87 | | |
98 | 88 | | |
99 | | - | |
| 89 | + | |
| 90 | + | |
100 | 91 | | |
101 | | - | |
| 92 | + | |
102 | 93 | | |
103 | 94 | | |
104 | | - | |
| 95 | + | |
105 | 96 | | |
106 | 97 | | |
107 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
108 | 102 | | |
109 | 103 | | |
110 | | - | |
111 | | - | |
| 104 | + | |
| 105 | + | |
112 | 106 | | |
113 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
114 | 111 | | |
115 | 112 | | |
116 | 113 | | |
| |||
0 commit comments