View unanswered posts | View active topics It is currently Thu Jul 10, 2014 7:25 am






Reply to topic  [ 3 posts ] 
Possible bug or my fault 
Author Message
Novice

Joined: Tue Jan 13, 2009 5:22 pm
Posts: 72
Location: USA, Pennsylvania
Post Possible bug or my fault
When I set a value from an integer to a rotation value devided by 90, it wont work.

RobotC 1.98.3 BETA for IFI with the latest firmware
Code:
#pragma config(Sensor, in1,    rotation,            sensorRotation, int3)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

int revolution;

task main()
{
  while(true)
  {
    revolution=rotation/90; //the revolution is never changed
    wait1Msec(1);
  }
}


RobotC 1.40 for IFI with 0721 firmware
Code:
const tSensors rotation             = (tSensors) in1;  //sensorRotation     //*!!!!*//
//*!!CLICK to edit 'wizard' created sensor & motor configuration.                !!*//

int revolution;

task main()
{
  while(true)
  {
    revolution=rotation/90;
    wait1Msec(1);
  }
}

_________________
We need a Linux Version!


Wed Nov 11, 2009 8:13 pm
Profile WWW
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3155
Location: Rotterdam, The Netherlands
Post Re: Possible bug or my fault
Shouldn't that be
Code:
revolution=SensorValue[rotation]/90 ?

?

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Thu Nov 12, 2009 3:25 am
Profile WWW
Novice

Joined: Tue Jan 13, 2009 5:22 pm
Posts: 72
Location: USA, Pennsylvania
Post Re: Possible bug or my fault
Yes my bad I'll try again.

_________________
We need a Linux Version!


Sun Nov 15, 2009 12:59 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 3 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.