-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Labels
bugSomething isn't workingSomething isn't workingpackage: wpiutilsubprojects/robotpy-wpiutilsubprojects/robotpy-wpiutil
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.
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)
$ python ../../t.py
Traceback (most recent call last):
File "../../t.py", in <module>
wpiutil.SendableRegistry.addChild(drive, leftLeader)
RuntimeError: Could not activate keep_alive!
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpackage: wpiutilsubprojects/robotpy-wpiutilsubprojects/robotpy-wpiutil
Type
Projects
Status
No status