@@ -67,10 +67,7 @@ class MagicRobot(wpilib.RobotBase):
67
67
68
68
def __init__ (self ) -> None :
69
69
super ().__init__ ()
70
- hal .report (
71
- hal .tResourceType .kResourceType_Framework .value ,
72
- hal .tInstances .kFramework_MagicBot .value ,
73
- )
70
+ hal .reportUsage ("Framework" , "Magicbot" )
74
71
75
72
self ._exclude_from_injection = ["logger" ]
76
73
@@ -85,7 +82,6 @@ def __init__(self) -> None:
85
82
# cache these
86
83
self .__is_ds_attached = wpilib .DriverStation .isDSAttached
87
84
self .__sd_update = wpilib .SmartDashboard .updateValues
88
- self .__lv_update = wpilib .LiveWindow .updateValues
89
85
# self.__sf_update = Shuffleboard.update
90
86
91
87
def _simulationInit (self ) -> None :
@@ -116,7 +112,6 @@ def robotInit(self) -> None:
116
112
# cache these
117
113
self .__is_ds_attached = wpilib .DriverStation .isDSAttached
118
114
self .__sd_update = wpilib .SmartDashboard .updateValues
119
- self .__lv_update = wpilib .LiveWindow .updateValues
120
115
# self.__sf_update = Shuffleboard.update
121
116
122
117
self .__nt = NetworkTableInstance .getDefault ().getTable ("/robot" )
@@ -259,14 +254,11 @@ def robotPeriodic(self) -> None:
259
254
You may use it for any code you need to run
260
255
during all modes of the robot (e.g NetworkTables updates)
261
256
262
- The default implementation will update
263
- SmartDashboard, LiveWindow and Shuffleboard.
257
+ The default implementation will update SmartDashboard
264
258
"""
265
259
watchdog = self .watchdog
266
260
self .__sd_update ()
267
261
watchdog .addEpoch ("SmartDashboard" )
268
- self .__lv_update ()
269
- watchdog .addEpoch ("LiveWindow" )
270
262
# self.__sf_update()
271
263
# watchdog.addEpoch("Shuffleboard")
272
264
@@ -519,7 +511,6 @@ def _test(self) -> None:
519
511
self .__nt_put_mode ("test" )
520
512
self .__nt_put_is_ds_attached (self .__is_ds_attached ())
521
513
522
- wpilib .LiveWindow .setEnabled (True )
523
514
# Shuffleboard.enableActuatorWidgets()
524
515
525
516
# initialize things
@@ -555,7 +546,6 @@ def _test(self) -> None:
555
546
delay .wait ()
556
547
watchdog .reset ()
557
548
558
- wpilib .LiveWindow .setEnabled (False )
559
549
# Shuffleboard.disableActuatorWidgets()
560
550
561
551
def _on_mode_enable_components (self ) -> None :
0 commit comments