SendableRegistry Add/AddLW/AddChild are broken
- Dominant language
- Python
- Stars
- 27
- Forks
- 29
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 12
Description
They are trying to use keep alives to keep the pointers alive but it's not the right solution.
Probably need to do the same thing we do for SmartDashboard with a separate hash map to hold references.
```python
import wpilib
import wpilib.drive
import wpiutil
leftLeader = wpilib.PWMSparkMax(1)
rightLeader = wpilib.PWMSparkMax(2)
drive = wpilib.drive.DifferentialDrive(
leftLeader,
rightLeader,
)
wpiutil.SendableRegistry.addChild(drive, leftLeader)
```
```sh
$ python ../../t.py
Traceback (most recent call last):
File "../../t.py", in
wpiutil.SendableRegistry.addChild(drive, leftLeader)
RuntimeError: Could not activate keep_alive!
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.