Skip to content

Commit

Permalink
Merge pull request #74 from auscompgeek/notifier-attr
Browse files Browse the repository at this point in the history
Remove Notifier attribute from sim/docs
  • Loading branch information
virtuald committed Dec 4, 2018
2 parents 9d79ad5 + 7748fba commit 3a85676
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions gen/MotController_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ c_MotController_SetDemand:
ControlMode.Velocity, ControlMode.Current]
prev_mode = self.hal_data['control_mode']
if mode in calc_modes and prev_mode not in calc_modes:
if self.Notifier and self._notifier is None:
if self._use_notifier and self._notifier is None:
self._notifier = Notifier(self._calculate_1ms)
if self._notifier is not None:
self._notifier.startPeriodic(0.001)
Expand Down Expand Up @@ -1654,7 +1654,7 @@ sim_class_extra: |
_iAccum = property(_get_iAccum, _set_iAccum)
Notifier = Notifier
_use_notifier = True
def _calculate_1ms(self):
if self.hal_data['clear_pos_on_limit_fwd'] and self.hal_data['limit_switch_closed_for']:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_talonsrx.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

@pytest.fixture(scope='function')
def talon(ctre):
ctre.WPI_TalonSRX.Notifier = None
ctre.WPI_TalonSRX._use_notifier = False
return ctre.WPI_TalonSRX(1)

@pytest.fixture(scope='function')
Expand Down

0 comments on commit 3a85676

Please sign in to comment.