View Single Post
  #1   Spotlight this post!  
Unread 31-05-2006, 10:01
tacman1123 tacman1123 is offline
Registered User
AKA: Tac Tacelosky
FRC #1900
Team Role: Mentor
 
Join Date: May 2006
Rookie Year: 2006
Location: Washington, DC
Posts: 17
tacman1123 is an unknown quantity at this point
Send a message via AIM to tacman1123
Re: Using printf() as UserCode in EasyC 2.0

Thanks, that helps. I'd still like to know more about how to integrate low-level calls, but your solution solved my immediate problem, which was a simple script to monitor the radio transmitter values (since the Online mode doesn't display those). For those that are interested, here it is.

Code:
#include "Main.h"

void main ( void )
{
      int time = 0; 
      int rx = 0; 
      int channel = 1; 
      int rx_value = 1; 
      int i = 0; 

      StartTimer ( 1 ) ;
      while ( 1 )
      {
            time = GetTimer ( 1 ) ;
            for ( rx=1 ; rx<=2 ; rx++ ) // loop through rx
            {
                  for ( channel=1 ; channel<=6 ; channel++ )
                  {
                        rx_value = GetRxInput ( rx , channel ) ;
                        PrintToScreen("%3d ", (int)rx_value);
                  }
            }
            PrintToScreen ( "at %d\n" , (int)time ) ;
      }
}
Now what would be nice is if the terminal window could be widened and the font could be changed to a fixed-width font, so that the results came out tabular instead of in a series of numbers.