Go to Post A link to BoardGameGeek in a FRC blog post... My worlds are colliding, and it's great! - rwodonnell [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 18-02-2005, 19:20
brownster brownster is offline
Registered User
#1392 (Team Kinematrix)
Team Role: Programmer
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Ajax,Ont
Posts: 21
brownster is an unknown quantity at this point
Print F statement

I can't seem to get my printf statements to work in Kevins nav code..heres what i have so far

printf("Port1 Y %3d, X %3d, DIGITAL %d, DIGITAL %d, Wheel %3d, p1_aux1 %d, p1_aux2 %d, pwm09 %3d\r",(int)p1_y,(int)p1_x,(int)digital_io_02,(int )digital_io_02,(int)p1_wheel,(int)p1_sw_aux1,(int) p1_sw_aux2,(int)pwm09);

THis is the error that it gives me when i try to build

C:\ROBOTICS\TEST CODE\FrcCode\user_routines.c:494:Warning [2066] type qualifier mismatch in assignment

HELP!
  #2   Spotlight this post!  
Unread 18-02-2005, 19:40
AIBob's Avatar
AIBob AIBob is offline
AI Programmer
AKA: Bob Frank DOT org
FRC #0358 (Hauppauge Robotic Eagles)
Team Role: Alumni
 
Join Date: Jan 2005
Rookie Year: 2003
Location: Long Island, NY (in Binghamton now)
Posts: 297
AIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to behold
Send a message via ICQ to AIBob Send a message via AIM to AIBob Send a message via MSN to AIBob Send a message via Yahoo to AIBob
Re: Print F statement

One problem with your code it that you are using digital_io_02. That is used for initialization, not for reading/sending data. You should use 'rc_dig_in02' for inputting the data, and I am not sure why you are printing it twice, but thats not a code problem.
__________________
- from B B frank

  #3   Spotlight this post!  
Unread 18-02-2005, 22:45
brownster brownster is offline
Registered User
#1392 (Team Kinematrix)
Team Role: Programmer
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Ajax,Ont
Posts: 21
brownster is an unknown quantity at this point
Re: Print F statement

Quote:
Originally Posted by AIBob
One problem with your code it that you are using digital_io_02. That is used for initialization, not for reading/sending data. You should use 'rc_dig_in02' for inputting the data, and I am not sure why you are printing it twice, but thats not a code problem.
ok i changed that part and it still gives me that error..any ideas?
  #4   Spotlight this post!  
Unread 18-02-2005, 22:50
AIBob's Avatar
AIBob AIBob is offline
AI Programmer
AKA: Bob Frank DOT org
FRC #0358 (Hauppauge Robotic Eagles)
Team Role: Alumni
 
Join Date: Jan 2005
Rookie Year: 2003
Location: Long Island, NY (in Binghamton now)
Posts: 297
AIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to behold
Send a message via ICQ to AIBob Send a message via AIM to AIBob Send a message via MSN to AIBob Send a message via Yahoo to AIBob
Re: Print F statement

Quote:
Originally Posted by brownster
ok i changed that part and it still gives me that error..any ideas?
Hmmm... it may have to do with the fact that you are converting a bit to an int,
Or less likely that you are converting the unsigned chars to ints.
__________________
- from B B frank

  #5   Spotlight this post!  
Unread 19-02-2005, 00:05
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,830
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Print F statement

Quote:
Originally Posted by brownster
C:\ROBOTICS\TEST CODE\FrcCode\user_routines.c:494:Warning [2066] type qualifier mismatch in assignment
That's not a problem. It's a known "feature" of the new compiler.
See the README.txt in the v2.4 project directory.
You can suppress this particular error by adding
-nw=2066
in MPLAB -> Project -> Build Options... -> Project
on the MPLAB C18 tab, click on Use Alternate Settings and add it to the end.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #6   Spotlight this post!  
Unread 20-02-2005, 01:29
brownster brownster is offline
Registered User
#1392 (Team Kinematrix)
Team Role: Programmer
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Ajax,Ont
Posts: 21
brownster is an unknown quantity at this point
Re: Print F statement

Quote:
Originally Posted by Mark McLeod
That's not a problem. It's a known "feature" of the new compiler.
See the README.txt in the v2.4 project directory.
You can suppress this particular error by adding
-nw=2066
in MPLAB -> Project -> Build Options... -> Project
on the MPLAB C18 tab, click on Use Alternate Settings and add it to the end.
Thnx..that surpressed it..but the printf wonts work..how can they work?
  #7   Spotlight this post!  
Unread 20-02-2005, 01:35
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,830
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Print F statement

Quote:
Originally Posted by brownster
Thnx..that surpressed it..but the printf wonts work..how can they work?
The new printf requires the addition of
#include <stdio.h>
at the top of any file that uses it. Otherwise, you won't see anything.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #8   Spotlight this post!  
Unread 20-02-2005, 01:58
Dested's Avatar
Dested Dested is offline
Registered User
AKA: El Presidente'
None #0498 (Cobra Commanders)
Team Role: Programmer
 
Join Date: Oct 2004
Rookie Year: 2003
Location: Glendale Arizona
Posts: 49
Dested will become famous soon enough
Send a message via AIM to Dested
Re: Print F statement

Quote:
Originally Posted by Mark McLeod
The new printf requires the addition of
#include <stdio.h>
at the top of any file that uses it. Otherwise, you won't see anything.
I realllllly wish that would throw an error. We thought our drive code wasnt executing for almost 2 days because the PrintF wasnt being called.
__________________

2001 Team Spirit Award - Southern California Regional
2004 Sportsmanship Award - Arizona Regional
2004 Finalist - Arizona Regional Thanks (Team 696 & 80)
2004 Master Plan Award - Arizona Regional (Team 60)
2005 #4 Seed - Arizona Regional
2005 Regional Semi Finalist - Arizona Regional Thanks (Team 980 & 96)
2005 GM Industrial Design Award - Arizona Regional
2005 Highest Regional Score - 112 - Arizona Regional
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mission Statement - what's your team's? KathieK Team Organization 21 27-05-2008 18:13
What is your most prefered programming language? Hailfire Programming 156 19-01-2005 21:42
Google Launches Google Print Search Joe Matt Chit-Chat 6 08-10-2004 17:13
Print a different page than current page? KathieK Website Design/Showcase 9 24-08-2004 21:11
Mission Statement Madison FIRST-related Organizations 11 19-05-2003 14:54


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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