Skip to content

Commit

Permalink
Fix simulation issue in follower mode
Browse files Browse the repository at this point in the history
- Fixes #6
  • Loading branch information
virtuald committed Mar 22, 2017
1 parent ad7cfef commit e38f496
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ctre/_impl/sim_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,14 @@ def update_tk_widgets(self, sim):

elif mode == tsrxc.kMode_SlaveFollower:
#follow the value of the motor value is equal too
motor.set_value(self.data[data['value']][0].get_value())
try:
followed = self.can[data['value']]
except KeyError:
value = 0
else:
value = followed[0].get_value()

motor.set_value(value)
#
# currently other control modes are not correctly implemented
#
Expand Down

1 comment on commit e38f496

@Leo428
Copy link

@Leo428 Leo428 commented on e38f496 Mar 22, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing!

Please sign in to comment.