Scheduler is not Sendable
Closed this issue · 5 comments
Attempting to add Scheduler to the SmartDashboard with
SmartDashboard.putData('Active Commands', Scheduler.getInstance())
fails with the message
TypeError: putData(): incompatible function arguments. The following argument types are supported:
1. (key: str, data: wpilib._wpilib.Sendable) -> None
2. (value: wpilib._wpilib.Sendable) -> None
According to the C++ documentation, Scheduler should extend Sendable
Looks like I explicitly ignore it for some reason (
robotpy-commands-v1/gen/Scheduler.yml
Line 18 in 7898ff9
How important is this?
Oh, I forgot to reinstall the wheel. Now I can see why I ignored the base:
>>> import wpilib.command
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/virtuald/.virtualenvs/frc-2020/lib/python3.7/site-packages/wpilib/command/__init__.py", line 4, in <module>
from ._commands_v1 import (
ImportError: generic_type: type "Scheduler" does not have a non-default holder type while its base "frc::Sendable" does
This is going to be difficult to fix, so how important is this?
I would classify it as a nice-to-have. It's handy to see the currently running commands on the dashboard, but my team can get along without it.
Does Scheduler not add itself to LiveWindow?
I tried to hack at this again and wasn't able to make it work. As a workaround, I made a separate static method for doing this (addToSmartDashboard).