File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 11import math
22
3- from magicbot import feedback , tunable
3+ from magicbot import feedback , tunable , will_reset_to
44from rev import SparkMax , SparkMaxConfig
55from wpilib import DigitalInput
66
@@ -16,6 +16,8 @@ class InjectorComponent:
1616 INJECTOR_RPS_TOLERANCE = 0.5
1717 INJECTOR_MAX_ACCEL = 0.5
1818
19+ desired_injector_voltage = will_reset_to (0.0 )
20+
1921 def __init__ (self ) -> None :
2022 self .algae_limit_switch = DigitalInput (DioChannel .ALGAE_INTAKE_SWITCH )
2123
@@ -52,8 +54,6 @@ def __init__(self) -> None:
5254
5355 self .should_measure = False
5456
55- self .desired_injector_voltage = 0.0
56-
5757 def on_enable (self ) -> None :
5858 self .has_seen_algae = False
5959
@@ -108,4 +108,3 @@ def execute(self) -> None:
108108 self .injector_2 .setVoltage (self .desired_injector_voltage )
109109
110110 self .should_measure = False
111- self .desired_injector_voltage = 0.0
You can’t perform that action at this time.
0 commit comments