Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   No!!!!!!!!!! (http://www.chiefdelphi.com/forums/showthread.php?t=15724)

Raven_Writer 05-01-2003 13:13

Re: Raven_Writer
 
Quote:

Originally posted by Caleb Fulton
Are you using the one- or two-joystick code for the full bot or the code for the edu bot?

I rewrote the culprit parts of the default code and it tolkenizes correctly. If anyone wants it, contact me on AIM (SN=aXvXiA).

I think it's 2. I didn't look through it to much, just wanted to know if it compiled fine for me. I think it's full, here's the filename: "2003_EDU_RC_Default.bsx" (Sorry, I'm a newb in the robotics thing)

Chris_C 05-01-2003 13:56

Re: Re: Raven_Writer
 
Quote:

Originally posted by Raven_Writer
I think it's 2. I didn't look through it to much, just wanted to know if it compiled fine for me. I think it's full, here's the filename: "2003_EDU_RC_Default.bsx" (Sorry, I'm a newb in the robotics thing)
I was speaking about the robot controller code for the real FRC game here, not the EDU bots code. I believe the file you are refering to was the one released with the EDU bots when those were shipped to the teams. I don't think that uses any of the new commands. What I was referring to here was the new default RC code that was released yesterday in conjunction with kickoff. It uses some new commands (in particular IF THEN ELSE statements as opposed to the old IF statements which could only be used to GOTO a label) that are not supported in the old parallax software. I think this is where people were talking about tokenizing errors, but correct me if I am wrong.

Raven_Writer 05-01-2003 13:59

Oh.....(-.-); D'oh! I think you're right.....but like I said, I'm a newb.

iscrc2 05-01-2003 15:24

Hey Caleb: did you restructure the innovation first default code to remove the if/else, selects, and do loops? If so could you post that to the white pages here?

Caleb Fulton 05-01-2003 15:34

Yes...that's
 
"Hey Caleb: did you restructure the innovation first default code to remove the if/else, selects, and do loops? If so could you post that to the white pages here?"

Yes...that's what I did.

The program didn't seem to mind the do loop, but I had to restructure the if/then and switch/case segments. I uploaded it to the white papers, but I don't see it on there, yet...

I assume it has to be screened first :)

rbayer 05-01-2003 15:43

Re: Yes...that's
 
Quote:

Originally posted by Caleb Fulton

The program didn't seem to mind the do loop, but I had to restructure the if/then and switch/case segments.

It didn't complain because it is still valid syntax, it just doesn't do what you think it does: it interprets "do" and "loop" to be labels. If you replace the "loop" with "goto do", it should work just fine.

Caleb Fulton 05-01-2003 16:04

BAH
 
The program I uploaded to the white papers has some problems with it... I'm using RoboEmu now to try and simulate whether or not it works, and the main loop does not...Can any of you take it off?

Raven_Writer 05-01-2003 16:08

Isn't there an option for the author of the white paper to take it down?

rbayer 05-01-2003 16:10

Re: BAH
 
Quote:

Originally posted by Caleb Fulton
The program I uploaded to the white papers has some problems with it... I'm using RoboEmu now to try and simulate whether or not it works, and the main loop does not...Can any of you take it off?
See my previous post. After you make the necessary changes, just go to your whitepaper and click "update". It will let you upload a new version and replace the old one as soon as Brandon approves the update.

iscrc2 05-01-2003 18:07

The cleaned up one is there but the limiter section does not work the same way as the default code. It will only check one limit per loop.

Caleb Fulton 05-01-2003 18:29

asdf
 
OOPS...you're right...

Caleb Fulton 05-01-2003 18:41

Fix?
 
I believe that this will fix it:

'---------- PWM outputs Limited by Limit Switches ---------------------------

IF rc_sw5 = 1 Then SW5
ChkLimit_Six:
IF rc_sw6 = 1 Then SW6
ChkLimit_Seven:
IF rc_sw7 = 1 Then SW7
ChkLimit_Eight:
IF rc_sw8 = 1 Then SW8
ChkLimit_Nine:
IF rc_sw9 = 1 Then SW9
ChkLimit_Ten:
IF rc_sw10 = 1 Then SW10
ChkLimit_Eleven:
IF rc_sw11 = 1 Then SW11
ChkLimit_Twelve:
IF rc_sw12 = 1 Then SW12
ChkLimit_Thirteen:
IF rc_sw13 = 1 Then SW13
ChkLimit_Fourteen:
IF rc_sw14 = 1 Then SW14
ChkLimit_Fifteen:
IF rc_sw15 = 1 Then SW15
ChkLimit_Sixteen:
IF rc_sw16 = 1 Then SW16
goto Done_With_Limiter

SW5:
p3_y = p3_y MAX 127
goto ChkLimit_Six
SW6:
p3_y = p3_y MIN 127
goto ChkLimit_Seven
SW7:
p4_y = p4_y MAX 127
goto ChkLimit_Eight
SW8:
p4_y = p4_y MIN 127
goto ChkLimit_Nine
SW9:
p1_wheel = p1_wheel MAX 127
goto ChkLimit_Ten
SW10:
p1_wheel = p1_wheel MIN 127
goto ChkLimit_Eleven
SW11:
p2_wheel = p2_wheel MAX 127
goto ChkLimit_Twelve
SW12:
p2_wheel = p2_wheel MIN 127
goto ChkLimit_Thirteen
SW13:
p3_wheel = p3_wheel MAX 127
goto ChkLimit_Fourteen
SW14:
p3_wheel = p3_wheel MIN 127
goto ChkLimit_Fifteen
SW15:
p4_wheel = p4_wheel MAX 127
goto ChkLimit_Sixteen
SW16:
p4_wheel = p4_wheel MIN 127


Done_With_Limiter:


All times are GMT -5. The time now is 20:38.

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