Go to Post I told myself I'd stay out of the obsession this year, but I couldn't resist... - Grant Cox [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 07-02-2008, 19:59
JBotAlan's Avatar
JBotAlan JBotAlan is offline
Forever chasing the 'bot around
AKA: Jacob Rau
FRC #5263
Team Role: Mentor
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Riverview, MI
Posts: 723
JBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond repute
Send a message via AIM to JBotAlan Send a message via Yahoo to JBotAlan
Printf prints only the first character

Hello,

I've been using printf to print out a menu to the terminal, so that I can interact with the program at run time. It has been working like a charm...until today.

I have this function that has been working great all along. Until I tried it today.

This is the function:
Code:
void PIM_Int_PrintPIDMenu(void) {
	//Print out the menu.
	printf("PID ADJUSTMENT MENU:\r\n");
	printf("Steering PID:\r\n");
	printf("P: %d / %d, I: %d / %d, D: %d / %d, Max I: %d\r\n",EEPROM_Read2Byte(EEPROM_ADDRESS_P_NUMERATOR),EEPROM_Read2Byte(EEPROM_ADDRESS_P_DENOMINATOR),EEPROM_Read2Byte(EEPROM_ADDRESS_I_NUMERATOR),EEPROM_Read2Byte(EEPROM_ADDRESS_I_DENOMINATOR),EEPROM_Read2Byte(EEPROM_ADDRESS_D_NUMERATOR),EEPROM_Read(EEPROM_ADDRESS_D_DENOMINATOR),EEPROM_Read(EEPROM_ADDRESS_I_MAX_PWM));
	printf("For P term:\r\n");
	printf("[a] Reset Num to 0 and Denom to 1\r\n");
	printf("[b]/[c] (Inc/Dec)rement Num\r\n");
	printf("[d]/[e] (Inc/Dec)rement Denom\r\n");
	printf("[f] Double Num and Denom\r\n");
	printf("For I term:\r\n");
	printf("[g] Reset Num to 0 and Denom to 1\r\n");
	printf("[h]/[i] (Inc/Dec)rement Num\r\n");
	printf("[j]/[k] (Inc/Dec)rement Denom\r\n");
	printf("[l] Double Num and Denom\r\n");
	printf("For D term:\r\n");
	printf("[m] Reset Num to 0 and Denom to 1\r\n");
	printf("[n]/[o] (Inc/Dec)rement Num\r\n");
	printf("[p]/[q] (Inc/Dec)rement Denom\r\n");
	printf("[r] Double Num and Denom\r\n");
	printf("[s] Refresh this menu (ALWAYS do before reading numbers!!!)\r\n");
	printf("Misc:\r\n");
	printf("[t]/[u] (Inc/Dec)rement I max PWM\r\n");
	printf("[v] Reset I max PWM to 0\r\n");
	printf("[w] Toggle anti-windup (currently %d)\r\n",EEPROM_Read(EEPROM_ADDRESS_I_ANTIWINDUP));
}
I should be getting each one's output in my terminal...but I get
Code:
PID ADJUSTMENT MENU:
Steering PID:
PF[[[[F[[[[F[[[[[M[[[
instead.

Has anyone seen this before? I'm seriously considering writing a homebrewn function to print each character independently...but I'd like to stay away from that route if at all possible.

Please help...
JBot
__________________
Aren't signatures a bit outdated?
 


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
THE FIRST AND ONLY PALMETTO FANTASY FIRST LEAGUE (so far!) Billfred Fantasy FIRST 106 04-04-2005 22:52
printf isn't printf-ing. Help! Meandmyself Programming 14 15-02-2004 16:27
pic: And it's only the first day... CD47-Bot Chit-Chat 8 17-01-2004 20:21
An effort to get all the blue prints measurment archiver 2001 1 23-06-2002 22:43


All times are GMT -5. The time now is 23:54.

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