Im not quite sure what’s causing your text to be replaced. Im pretty its the comp code. Anyways the way i did it was i had a seperate task for the lcd and then started it in task main.
Does the text you want ever appear on the lcd? Try and figure out when it disappears.
Here is the pre-auton function from recent (last year or so) versions of ROBOTC.
/*---------------------------------------------------------------------------*/
/* Pre-Autonomous Functions */
/* */
/* You may want to perform some actions before the competition starts. */
/* Do them in the following function. You must return from this function */
/* or the autonomous and usercontrol tasks will not be started. This */
/* function is only called once after the cortex has been powered on and */
/* not every time that the robot is disabled. */
/*---------------------------------------------------------------------------*/
void pre_auton()
{
// Set bStopTasksBetweenModes to false if you want to keep user created tasks
// running between Autonomous and Driver controlled modes. You will need to
// manage all user created tasks if set to false.
bStopTasksBetweenModes = true;
// Set bDisplayCompetitionStatusOnLcd to false if you don't want the LCD
// used by the competition include file, for example, you might want
// to display your team name on the LCD in this function.
// bDisplayCompetitionStatusOnLcd = false;
// All activities that occur before the competition starts
// Example: clearing encoders, setting servo positions, ...
}
Notice the comments say
// Set bDisplayCompetitionStatusOnLcd to false if you don't want the LCD
// used by the competition include file, for example, you might want
// to display your team name on the LCD in this function.
// bDisplayCompetitionStatusOnLcd = false;
so uncomment this line so it shows like this.
bDisplayCompetitionStatusOnLcd = false;
startTask also used to cause the task name to be displayed, but I removed that about 18 months ago.
If I were you, I would go back to the default template for some simple debug testing. For instance, this is what my team had last year and it seemed to work just fine. In addition, if you go to “Sample Programs” in RobotC, you can find an LCD program that works perfectly fine.