View unanswered posts | View active topics It is currently Fri Jul 25, 2014 8:16 am






Reply to topic  [ 2 posts ] 
nSyncedMotors not recognizing a reversed motor in #pragma? 
Author Message
Rookie

Joined: Wed Jan 25, 2012 5:54 pm
Posts: 6
Location: New Brighton, PA
Post nSyncedMotors not recognizing a reversed motor in #pragma?
Bug Report
Code:
#pragma config(Sensor, S1,     colorLeft,      sensorCOLORFULL)
#pragma config(Sensor, S2,     colorRight,     sensorCOLORFULL)
#pragma config(Sensor, S3,     sonarSensor,    sensorSONAR)
#pragma config(Motor,  motorB,          left,          tmotorNormal, openLoop, reversed, encoder)
#pragma config(Motor,  motorC,          right,         tmotorNormal, openLoop, encoder)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//


I have a robot built in such a way that one of the drive motors needs to be reversed, the other does not. I have the #pragmas set to reverse it, but when I use a nSyncedMotors, the motor behaves as though it is not reversed. For example:
Code:
nSyncedMotors = synchBC;
  nSyncedTurnRatio = 100;
  nMotorEncoder[left] = 0;
  nMotorEncoderTarget[left] = 1666;
  motor[left] =  50;
  while(nMotorRunState[motorB] != runStateIdle) {}

I have a workaround, (set the ratio to negative) but it is annoying to have to change it every time you use it after you realize what is going on.
Is this intentional? Or is it just a overlooked problem?

_________________
--mr64bit


Wed Feb 08, 2012 1:57 pm
Profile WWW
Rookie

Joined: Wed Jan 25, 2012 5:54 pm
Posts: 6
Location: New Brighton, PA
Post Re: nSyncedMotors not recognizing a reversed motor in #pragm
I've also noticed that while the nMotorEncoder[] does recognize the reversed, nMotorEncoderTarget does NOT! Any others?

_________________
--mr64bit


Mon Feb 27, 2012 3:14 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: Bichon 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.