Go to Post Maybe this thread should be re-titled "Waiting impatiently for the 2011 hint!" since having over 100 posts doesn't seem very patient. - Joe Ross [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 25-01-2012, 08:58
meltbox360 meltbox360 is offline
Registered User
FRC #4302
 
Join Date: Jan 2012
Location: Chicago, Il
Posts: 32
meltbox360 is a glorious beacon of lightmeltbox360 is a glorious beacon of lightmeltbox360 is a glorious beacon of lightmeltbox360 is a glorious beacon of lightmeltbox360 is a glorious beacon of light
Re: Jaguar Blinking Yellow

Quote:
Originally Posted by bob.wolff68 View Post
Ok -- so I've taken a longer look at the code and there are a number of issues. Rather than going over each one individually, I'm going to ask why you don't start with the "FRC SimpleRobot" template instead of trying to write from scratch. The program you have here uses things that the SimpleRobot class doesn't use in the template. That's not a bad thing if you're experienced, but it appears you may be pretty new to this. One of the big items here, however, is that OperatorControl() is called ONCE and you need to have a "while isOperatorControl() { ... }" loop or else it'll call your code, you set a few things, and then a millisecond later, you're no longer running your robot code. It is quite possible that your function calls work on the Jaguar itself, but since SimpleRobot is not being used properly, it appears to be unsuccessful.

I would suggest starting with the template and modifying from there. It'll likely be much less problematic. Also, I'd suggest taking the SimpleRobot docs from the help file and print them out, STUDY them, and highlight/make-notes.

Then if it's still a problem, send me a PM with your phone number and we'll get on the phone and talk it through.

Thanks,
bob
Thanks so much! The reason I wrote my own is since the simplerobot template did not do anything. I thought the wait would cause it to spin for 2 seconds and I intended it to be a quick linear run through the code that spun a motor for two seconds and exited. I really appreciate the help.
Reply With Quote
  #17   Spotlight this post!  
Unread 25-01-2012, 11:01
bob.wolff68's Avatar
bob.wolff68 bob.wolff68 is offline
Da' Mentor Man
FRC #1967
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2007
Location: United States
Posts: 157
bob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nice
Re: Jaguar Blinking Yellow

You're welcome. I thought that the SimpleRobot demo example did do a drive forward for 2 seconds in autonomous and also did arcade drive during teleop though. Let me know how things turn out.

bob
__________________
~~~~~~~~~~~~~~~~~~~
Bob Wolff - Software from the old-school
Mentor / C / C++ guy
Team 1967 - The Janksters - San Jose, CA
Reply With Quote
  #18   Spotlight this post!  
Unread 25-01-2012, 13:16
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Jaguar Blinking Yellow

Quote:
Originally Posted by meltbox360 View Post
The funny thing is that all of the red AND green lit up when I ran my code. That's very strange...
It's so strange that I suspect you either have a broken Digital Sidecar or a faulty cable connecting it to the DIO module in the cRIO. Do you have access to any others to try swapping them out?
Reply With Quote
  #19   Spotlight this post!  
Unread 25-01-2012, 18:23
meltbox360 meltbox360 is offline
Registered User
FRC #4302
 
Join Date: Jan 2012
Location: Chicago, Il
Posts: 32
meltbox360 is a glorious beacon of lightmeltbox360 is a glorious beacon of lightmeltbox360 is a glorious beacon of lightmeltbox360 is a glorious beacon of lightmeltbox360 is a glorious beacon of light
Re: Jaguar Blinking Yellow

Quote:
Originally Posted by Alan Anderson View Post
It's so strange that I suspect you either have a broken Digital Sidecar or a faulty cable connecting it to the DIO module in the cRIO. Do you have access to any others to try swapping them out?
Unfortunately I do not. There is one little mark on the cable that looks funny so it isn't impossible that the erratic behavior is caused by the cable however I have gotten it to run with another example program so if it is a problem it is a problem it should stop working if I run it a few times and wiggle the cable around. I will make sure to check that as well.

EDIT:
Simple robot does indeed do those things at least the code suggests it should but the last time I ran it absolutely nothing happened. I will try again. The main difference I have spotted between the example code that I ran and worked and simple robot is the working code use the "new" c++ keyword to allocate memory for a "RobotDrive" object instead of the way the simple robot and my code have it done. I should definitely see if that fixes it although it should not have any effect unless the code is doing something really weird behind the scenes.

Last edited by meltbox360 : 25-01-2012 at 18:27.
Reply With Quote
  #20   Spotlight this post!  
Unread 25-01-2012, 19:57
bob.wolff68's Avatar
bob.wolff68 bob.wolff68 is offline
Da' Mentor Man
FRC #1967
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2007
Location: United States
Posts: 157
bob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nice
Re: Jaguar Blinking Yellow

If you are heading into "strange-land" possibly...I would suggest that you try the known-good labview program like 10 times in a row with moving a few things around ... wiring etc... if you get rock solid consistent results there, then move to C++ simplerobot and re-test... this would help gain you some sanity if it help identify a hardware flakey issue.

bob
__________________
~~~~~~~~~~~~~~~~~~~
Bob Wolff - Software from the old-school
Mentor / C / C++ guy
Team 1967 - The Janksters - San Jose, CA
Reply With Quote
  #21   Spotlight this post!  
Unread 31-01-2012, 23:11
meltbox360 meltbox360 is offline
Registered User
FRC #4302
 
Join Date: Jan 2012
Location: Chicago, Il
Posts: 32
meltbox360 is a glorious beacon of lightmeltbox360 is a glorious beacon of lightmeltbox360 is a glorious beacon of lightmeltbox360 is a glorious beacon of lightmeltbox360 is a glorious beacon of light
Re: Jaguar Blinking Yellow

I am leaning toward either a broken cable at the moment as I have found that initializing a Jaguar appears to init a relay. EG I init PWM 1 as a Jaguar and instead relay 1 lights up green. Any thoughts?

EDIT: As a side note. The code that works for me in tele-op uses RobotDrive however it now refuses to drive the motors 100% forward but will drive them at 100% in reverse. More strange stuff?

Just to make sure what should all the lights on the cRIO FRC II be lit up as? Just want to make sure I didn't overlook those stupidly.

Last edited by meltbox360 : 31-01-2012 at 23:20.
Reply With Quote
Reply


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 03:01.

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