Jeff,Is that code from a 1.46 program you opened up in 1.93? If so, I had a similar problem. I don't have access to RobotC at the moment, but as I recall, I completely re-entered the servos in the Motor/Servo setup screens and it replaced the #pragma entries for the servos with an updated syntax which then compiled fine. I can't remember what was different about the syntax, but if you are having the same issue, maybe you can post the changes?Thanks,l0jec

Tue Sep 22, 2009 8:14 am

Jeff McBride

Professor

Joined: Fri Sep 19, 2008 1:22 amPosts: 200

Re: Constants declared in #pragmas not working in 1.93...

Running through the Motor and Sensor Setup Wizard again and reentering all of the data did not fix the problem It still doesn't compile.

_________________Jeff McBrideBenson Robotics Club

Tue Sep 22, 2009 10:37 am

l0jec

Expert

Joined: Mon Oct 27, 2008 9:59 pmPosts: 139

Re: Constants declared in #pragmas not working in 1.93...

If you deleted the existing #pragma info and then re-entered it from scratch, then I'm not sure why you're still seeing an issue. I'm pretty sure I have code in 1.93 with motor/servo #pragma statements with aliases defined as constants which compile for me...I'll double check this evening if you still have the issue unresolved.

Tue Sep 22, 2009 10:57 am

l0jec

Expert

Joined: Mon Oct 27, 2008 9:59 pmPosts: 139

Re: Constants declared in #pragmas not working in 1.93...

Jeff,I get the same error with your code, but the workaround of re-entering the servos in the Motor/Servo setup does resolve the issue for me. Specifically, I renamed each servo, clicked Apply, then renamed them back, and clicked Apply again. Here I suspect the IDE will not update the #pragma statements unless it detects a change.

A few of the sensors have new names, too. An example of this is the I2C sensor at normal speed. It was called "sensorI2CCustomStd" in 1.46 but in 1.9x it's "sensorLowSpeed". The "sensorI2CCustomStd" name still works but is substituted when you run the wizard. This does render your code unusable for people using 1.46, so I tend to edit those pragmas by hand

Who is online

Users browsing this forum: No registered users and 2 guests

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