robotpy/examples

Examples still reference now non-existent LiveWindow methods

RustyRaptor opened this issue · 4 comments

In the arcadedrive navx example we are getting a deprecation warning in the latest release. Here is the test output:

============================= test session starts =============================
platform win32 -- Python 3.6.4, pytest-3.4.2, py-1.5.2, pluggy-0.6.0
rootdir: C:\Users\Thunderdogs Driver\Downloads\5613-tank-drive-2018-master\5613-tank-drive-2018-master\tests, inifile:
collected 8 items

pyfrc_test.py ........                                                   [100%]

============================== warnings summary ===============================
pyfrc_test.py::test_autonomous[RRR]
  C:/Users/Thunderdogs Driver/Downloads/5613-tank-drive-2018-master/5613-tank-drive-2018-master/robot.py:124: DeprecationWarning: addActuator is deprecated. Use Sendable.setName(subsystem, name) instead.
    wpilib.LiveWindow.addActuator("DriveSystem", "RotateController", turnController)

pyfrc_test.py::test_autonomous[RLR]
  C:/Users/Thunderdogs Driver/Downloads/5613-tank-drive-2018-master/5613-tank-drive-2018-master/robot.py:124: DeprecationWarning: addActuator is deprecated. Use Sendable.setName(subsystem, name) instead.
    wpilib.LiveWindow.addActuator("DriveSystem", "RotateController", turnController)

pyfrc_test.py::test_autonomous[LRL]
  C:/Users/Thunderdogs Driver/Downloads/5613-tank-drive-2018-master/5613-tank-drive-2018-master/robot.py:124: DeprecationWarning: addActuator is deprecated. Use Sendable.setName(subsystem, name) instead.
    wpilib.LiveWindow.addActuator("DriveSystem", "RotateController", turnController)

pyfrc_test.py::test_autonomous[LLL]
  C:/Users/Thunderdogs Driver/Downloads/5613-tank-drive-2018-master/5613-tank-drive-2018-master/robot.py:124: DeprecationWarning: addActuator is deprecated. Use Sendable.setName(subsystem, name) instead.
    wpilib.LiveWindow.addActuator("DriveSystem", "RotateController", turnController)

pyfrc_test.py::test_disabled
  C:/Users/Thunderdogs Driver/Downloads/5613-tank-drive-2018-master/5613-tank-drive-2018-master/robot.py:124: DeprecationWarning: addActuator is deprecated. Use Sendable.setName(subsystem, name) instead.
    wpilib.LiveWindow.addActuator("DriveSystem", "RotateController", turnController)

pyfrc_test.py::test_operator_control
  C:/Users/Thunderdogs Driver/Downloads/5613-tank-drive-2018-master/5613-tank-drive-2018-master/robot.py:124: DeprecationWarning: addActuator is deprecated. Use Sendable.setName(subsystem, name) instead.
    wpilib.LiveWindow.addActuator("DriveSystem", "RotateController", turnController)

pyfrc_test.py::test_practice
  C:/Users/Thunderdogs Driver/Downloads/5613-tank-drive-2018-master/5613-tank-drive-2018-master/robot.py:124: DeprecationWarning: addActuator is deprecated. Use Sendable.setName(subsystem, name) instead.
    wpilib.LiveWindow.addActuator("DriveSystem", "RotateController", turnController)

pyfrc_test.py::test_fuzz
  C:/Users/Thunderdogs Driver/Downloads/5613-tank-drive-2018-master/5613-tank-drive-2018-master/robot.py:124: DeprecationWarning: addActuator is deprecated. Use Sendable.setName(subsystem, name) instead.
    wpilib.LiveWindow.addActuator("DriveSystem", "RotateController", turnController)

-- Docs: http://doc.pytest.org/en/latest/warnings.html
==================== 8 passed, 8 warnings in 42.36 seconds ====================

Process finished with exit code 

Good question. Our tests have tons of these too... need to add (a) more informative messages and (b) get rid of them from our tests, they're really obnoxious!

On the front of getting rid of them from tests, perhaps it's a good idea to suppress warnings in the pyfrc tests except test_practice and test_fuzz. No good reason to show the same warnings so many times.

OBE I think.

I think we still have examples that reference these LiveWindow methods, which have now been removed from WPILib entirely. (Looking at our port of the command-based examples...)