View unanswered posts | View active topics It is currently Tue Jul 22, 2014 9:16 pm






Reply to topic  [ 4 posts ] 
Internal Parameter 
Author Message
Rookie
User avatar

Joined: Thu Dec 05, 2013 12:57 pm
Posts: 8
Location: Las Vegas
Post Internal Parameter
We are using joysticks to run a code and it was working before, but now it says "Error: Internal Parameters". I don't know what that means or how to fix it. Can anyone help?


Wed Jan 08, 2014 6:48 pm
Profile WWW
Novice

Joined: Sat Aug 31, 2013 9:15 am
Posts: 90
Post Re: Internal Parameter
Could you please post your code so we can take a look at it? Also, when do you get the error? Is it while compiling, or while the program is running on the NXT?

_________________
Burning Lights Programming
FTC Team 6100 Chariots of Fire - Programmer (2012-2013)
FTC Team 7468 Blue Chariots of Fire - Programmer (2013-2014)
Check out our team website at http://cof7468.weebly.com/.


Thu Jan 09, 2014 11:08 am
Profile
Rookie
User avatar

Joined: Thu Dec 05, 2013 12:57 pm
Posts: 8
Location: Las Vegas
Post Re: Internal Parameter
BurningLights wrote:
Could you please post your code so we can take a look at it? Also, when do you get the error? Is it while compiling, or while the program is running on the NXT?

It shows on on the right controller when I click debugger windows>Joystick Competition.

Code:
#pragma config(Hubs,  S1, HTMotor,  none,     none,     none)
#pragma config(Hubs,  S2, HTMotor,  none,     none,     none)
#pragma config(Hubs,  S3, HTMotor,  none,     none,     none)
#pragma config(Sensor, S1,     ,               sensorI2CMuxController)
#pragma config(Sensor, S2,     ,               sensorI2CMuxController)
#pragma config(Sensor, S3,     ,               sensorI2CMuxController)
#pragma config(Motor,  mtr_S1_C1_1,     motorF,        tmotorTetrix, openLoop, reversed)
#pragma config(Motor,  mtr_S1_C1_2,     motorG,        tmotorTetrix, openLoop)
#pragma config(Motor,  mtr_S2_C1_1,     motorD,        tmotorTetrix, openLoop)
#pragma config(Motor,  mtr_S2_C1_2,     motorE,        tmotorTetrix, openLoop, reversed)
#pragma config(Motor,  mtr_S3_C1_1,     motorH,        tmotorTetrix, openLoop)
#pragma config(Motor,  mtr_S3_C1_2,     motorI,        tmotorTetrix, openLoop, reversed)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

#include "JoystickDriver.c"

task main()
{

while(true)
    {
        getJoystickSettings(joystick);
        motor[motorD] = joystick.joy1_y1;
        motor[motorE] = joystick.joy1_y2; //Motor E is Reversed

        getJoystickSettings(joystick);
         {if(abs(joystick.joy2_y1) > 10){
         {
        motor[motorF] = joystick.joy2_y1/2;
        motor[motorG] = joystick.joy2_y1/2; //Motor G is reversed
        else{
           motor[motorF] = 0;
           motor[motorG] = 0;
      }}}
            { if(abs(joystick.joy2_y2) > 10){
        motor[motorH] = joystick.joy2_y2/2;
        motor[motorI] = joystick.joy2_y2/2; //Motor I is reversed
        else{
           motor[motorH] = 0;
           motor[motorI] = 0;
        }}}

    }



Thu Jan 09, 2014 12:06 pm
Profile WWW
Rookie
User avatar

Joined: Wed Jan 09, 2013 11:48 pm
Posts: 35
Location: Saint Paul, MN
Post Re: Internal Parameter
I believe the problem might be that your else statements are inside your if statements:
Code:
         {if(abs(joystick.joy2_y1) > 10){
         {
        motor[motorF] = joystick.joy2_y1/2;
        motor[motorG] = joystick.joy2_y1/2; //Motor G is reversed
        else{
           motor[motorF] = 0;
           motor[motorG] = 0;
      }}}


This can be shortened to:
Code:
         if(abs(joystick.joy2_y1) > 10){
        motor[motorF] = joystick.joy2_y1/2;
        motor[motorG] = joystick.joy2_y1/2; //Motor G is reversed
        }
        else{
           motor[motorF] = 0;
           motor[motorG] = 0;
        }


I tried compiling this exact code in RobotC 3.62 and it threw me a major error on the else statements and merely ignored them, I have no idea how your code is even compiling for you. So I would fix those problems and then see how it works.

_________________
Head Programmer FTC Team 6699, Tempest

Code:
<Life>
   Fun
</Life>


Thu Jan 09, 2014 1:08 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.