Go to Post Pretty sure getting a frowny face from a safety inspector means you're doing it right. - Cory [more]
Home
Go Back   Chief Delphi > Technical > Programming > Python
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 14-03-2014, 02:48
myork myork is offline
Registered User
FRC #2928
 
Join Date: Feb 2014
Location: United States
Posts: 11
myork has a spectacular aura aboutmyork has a spectacular aura about
PIDController causing code to fail silently

Hola,

We attempted to add a PIDController to our RobotPy code:


self.left_motors = wpilib.Talon(2)
self.left_encoder = wpilib.Encoder(2, 3)
self.left_pid_controller = wpilib.PIDController(self.p, self.i, self.d, self.left_encoder, self.left_motors)


But having the PIDController constructor line causes very strange behavior:

We raise a SystemExit when a joystick button is pressed in order to have RobotPy hot reload the code. This works fine, but if we include the PIDController line the code completely stops running. By "stops running" I mean Robot Comms are green, Robot Code is green, SmartDashboard says it's connected, but the none of the code is run. Print statements won't work, SmartDashboard updates on every tick aren't happening, etc. There is no Python running on the cRio.

Any idea what's going on or how to fix it?
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 06:22.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi