Repository navigation
Commit 002fedd
committed
trsrn: set the kinematics pins up once, at load
Both modules build their pins on the first kinematicsType() call and
test an is_setup flag that nothing ever sets, so every later call runs
the setup again. The second run reassigns haldata to a fresh block and
then fails to create the pins that block points at, all of them already
taken, so the module is left reading through null references and the
next forward or inverse call takes realtime with it.
Motion asks twice when num_extrajoints is greater than zero, once in
rtapi_app_main and once in init_comm_buffers, so that combination
cannot be running today.
Latching the flag would stop the repeat, but the setup does not belong
in a function whose job is to answer a question. halcompile has a hook
for this, used by homecomp for the same reason: EXTRA_SETUP() runs once
from the generated setup, before the component is made ready. So the
pins exist from the moment the module is loaded, kinematicsType() only
answers, and the hal_set_unready() and hal_ready() calls the old
placement needed are gone with it.1 parent cffa81d commit 002fedd
2 files changed
Lines changed: 10 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
51 | | - | |
52 | | - | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
79 | | - | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| |||
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
139 | | - | |
140 | | - | |
141 | 140 | | |
142 | 141 | | |
143 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
| |||
76 | 80 | | |
77 | 81 | | |
78 | 82 | | |
79 | | - | |
80 | 83 | | |
81 | 84 | | |
82 | 85 | | |
| |||
136 | 139 | | |
137 | 140 | | |
138 | 141 | | |
139 | | - | |
140 | | - | |
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
| |||
0 commit comments