VEX2 Functions Display
From ROBOTC API Guide
(→displayLCDCenteredString) |
|||
| (13 intermediate revisions by one user not shown) | |||
| Line 1: | Line 1: | ||
| − | + | <yambe:breadcrumb self="Display">VEX2_Functions_and_Variables|Functions and Variables</yambe:breadcrumb> | |
| − | + | <br /> | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
{| | {| | ||
|- | |- | ||
| − | | | + | |''For information about ROBOTC ''string'', please see the article: [[VEX2_Functions_Strings|Strings]].'' |
| − | | | + | |- |
| − | + | | | |
| − | ! | + | '''Some display functions offer a precision parameter, which pads the displayed number with either zeros or spaces, until the number of digits is equal to the precision value:''' |
| − | + | {| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:center; font-size:100%; border-collapse: separate; border-spacing: 0; border-width: 1px; border-style: solid; border-color: #000;" cellpadding="5%" | |
| − | + | ! style="border-style: solid; border-width: 0px 1px 1px 0px"|''Precision value'' | |
| − | + | ! style="text-align:left; border-style: solid; border-width: 0px 1px 1px 0px"|Description | |
| − | + | ! style="border-style: solid; border-width: 0px 0px 1px 0px"|Example Output | |
| − | + | |- | |
| − | + | | style="border-style: solid; border-width: 0px 1px 1px 0px"|-4 | |
| − | + | | style="text-align:left; border-style: solid; border-width: 0px 1px 1px 0px"|Pads the displayed number with zeros until the number of digits equals 4. | |
| + | | style="border-style: solid; border-width: 0px 0px 1px 0px"|000# <br />00## <br />0### <br />#### | ||
| + | |- | ||
| + | | style="border-style: solid; border-width: 0px 1px 1px 0px"|0 | ||
| + | | style="text-align:left; border-style: solid; border-width: 0px 1px 1px 0px"|No padding. | ||
| + | | style="border-style: solid; border-width: 0px 0px 1px 0px"|## | ||
| + | |- | ||
| + | | style="border-style: solid; border-width: 0px 1px 0px 0px"|4 | ||
| + | | style="text-align:left; border-style: solid; border-width: 0px 1px 0px 0px"|Pads the displayed number with spaces until the number of digits equals 4. | ||
| + | | style="border-style: solid; border-width: 0px 0px 0px 0px"|_ _ _# <br />_ _## <br />_### <br />#### | ||
| + | |- | ||
| + | |} | ||
| + | ''Note: Underscore ( _ ) character denotes a space.'' | ||
| + | <br /> | ||
|- | |- | ||
|} | |} | ||
| + | <br /> | ||
| + | {{tl|1|1}} | ||
| + | <br /> | ||
== clearLCDLine == | == clearLCDLine == | ||
| Line 63: | Line 67: | ||
{| style="color:black;" width="100%" cellpadding="5%" cellspacing="0" border="0" | {| style="color:black;" width="100%" cellpadding="5%" cellspacing="0" border="0" | ||
|- | |- | ||
| − | | class="functionType"| <span class="bigKeywordBI">void </span><span class="bigKeywordB">displayLCDCenteredString</span><span class="bigCodePunc">(</span><span class="bigKeywordBI">const int </span><span class="bigCodeBasic">nLine</span><span class="bigCodePunc">,</span><span class="bigKeywordBI">string </span><span class="bigCodeBasic">sString</span><span class="bigCodePunc">)</span> | + | | class="functionType"| <span class="bigKeywordBI">void </span><span class="bigKeywordB">displayLCDCenteredString</span><span class="bigCodePunc">(</span><span class="bigKeywordBI">const int </span><span class="bigCodeBasic">nLine</span><span class="bigCodePunc">, </span><span class="bigKeywordBI">string </span><span class="bigCodeBasic">sString</span><span class="bigCodePunc">)</span> |
|- | |- | ||
| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;"|([[Data_Types#dataType_void|void]]) Clears the indicated line of the VEX LCD to blanks. | | style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;"|([[Data_Types#dataType_void|void]]) Clears the indicated line of the VEX LCD to blanks. | ||
| Line 87: | Line 91: | ||
|- | |- | ||
|<syntaxhighlight lang="ROBOTC">displayLCDCenteredString(0,"ROBOT123"); //Displays the string "ROBOTC123" to the center of line 0</syntaxhighlight> | |<syntaxhighlight lang="ROBOTC">displayLCDCenteredString(0,"ROBOT123"); //Displays the string "ROBOTC123" to the center of line 0</syntaxhighlight> | ||
| + | |- | ||
| + | |} | ||
| + | |- | ||
| + | |} | ||
| + | <br /> | ||
| + | |||
| + | == displayLCDChar == | ||
| + | {| style="color:black;" width="100%" cellpadding="5%" cellspacing="0" border="0" | ||
| + | |- | ||
| + | | class="functionType"| <span class="bigKeywordBI">void </span><span class="bigKeywordB">displayLCDChar</span><span class="bigCodePunc">(</span><span class="bigKeywordBI">const int </span><span class="bigCodeBasic">nLine</span><span class="bigCodePunc">, </span><span class="bigKeywordBI">const int </span><span class="bigCodeBasic">nPos</span><span class="bigCodePunc">, </span><span class="bigKeywordBI">const int </span><span class="bigCodeBasic">cChar</span><span class="bigCodePunc">)</span> | ||
| + | |- | ||
| + | | style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;"|([[Data_Types#dataType_void|void]]) Clears the indicated line of the VEX LCD to blanks. | ||
| + | |- | ||
| + | | | ||
| + | {| class="parameterTable" cellpadding="5%" width="100%" | ||
| + | ! width="20%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Parameter | ||
| + | ! width="60%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Explanation | ||
| + | ! width="20%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Data Type | ||
| + | |- | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|''nLine'' | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|The line to display on. 0 is the top, 1 is the bottom. | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|[[Data_Types#dataType_int|int]] | ||
| + | |- | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|''nPos'' | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|The position on 'nLine' to display from. | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|[[Data_Types#dataType_int|int]] | ||
| + | |- | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|''cChar'' | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|The char to display. Can be an int or char. | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|[[Data_Types#dataType_int|int]] | ||
| + | |- | ||
| + | |} | ||
| + | |- | ||
| + | | | ||
| + | {| | ||
| + | |- | ||
| + | |<syntaxhighlight lang="ROBOTC">displayLCDChar(0,0,'C'); //Displays the character 'C' at the first position on the first line.</syntaxhighlight> | ||
| + | |- | ||
| + | |} | ||
| + | |- | ||
| + | |} | ||
| + | <br /> | ||
| + | |||
| + | == displayLCDNumber == | ||
| + | {| style="color:black;" width="100%" cellpadding="5%" cellspacing="0" border="0" | ||
| + | |- | ||
| + | | class="functionType"| <span class="bigKeywordBI">void </span><span class="bigKeywordB">displayLCDNumber</span><span class="bigCodePunc">(</span><span class="bigKeywordBI">const int </span><span class="bigCodeBasic">nLine</span><span class="bigCodePunc">, </span><span class="bigKeywordBI">const int </span><span class="bigCodeBasic">nPos</span><span class="bigCodePunc">, </span><span class="bigKeywordBI">const int </span><span class="bigCodeBasic">nValue</span><span class="bigCodePunc">, </span><span class="bigKeywordBI">const int </span><span class="bigCodeBasic">nPrecision</span><span class="bigCodePunc"> = -</span><span class="bigCodeStringsNums">1</span><span class="bigCodePunc">)</span> | ||
| + | |- | ||
| + | | style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;"|([[Data_Types#dataType_void|void]]) Displays a number nValue on line nLine at position nPos. | ||
| + | |- | ||
| + | | | ||
| + | {| class="parameterTable" cellpadding="5%" width="100%" | ||
| + | ! width="20%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Parameter | ||
| + | ! width="60%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Explanation | ||
| + | ! width="20%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Data Type | ||
| + | |- | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|''nLine'' | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|The line to display on. 0 is the top, 1 is the bottom. | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|[[Data_Types#dataType_int|int]] | ||
| + | |- | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|''nPos'' | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|The position on 'nLine' to display from. | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|[[Data_Types#dataType_int|int]] | ||
| + | |- | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|''nValue'' | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|The number to display. | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|[[Data_Types#dataType_int|int]] | ||
| + | |- | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|''nPrecision'' | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|The precision of the number. -1 by default. | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|[[Data_Types#dataType_int|int]] | ||
| + | |- | ||
| + | |} | ||
| + | |- | ||
| + | | | ||
| + | {| | ||
| + | |- | ||
| + | |<syntaxhighlight lang="ROBOTC">displayLCDNumber(0,0,331); // displays the number 331 at the first position on the first line</syntaxhighlight> | ||
| + | |- | ||
| + | |} | ||
| + | |- | ||
| + | |} | ||
| + | <br /> | ||
| + | |||
| + | == displayLCDPos == | ||
| + | {| style="color:black;" width="100%" cellpadding="5%" cellspacing="0" border="0" | ||
| + | |- | ||
| + | | class="functionType"| <span class="bigKeywordBI">void </span><span class="bigKeywordB">displayLCDPos</span><span class="bigCodePunc">(</span><span class="bigKeywordBI">const int </span><span class="bigCodeBasic">nLine</span><span class="bigCodePunc">, </span><span class="bigKeywordBI">const int </span><span class="bigCodeBasic">nPos</span><span class="bigCodePunc">)</span> | ||
| + | |- | ||
| + | | style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;"|([[Data_Types#dataType_void|void]]) Sets the next display position on the VEX LCD. | ||
| + | |- | ||
| + | | | ||
| + | {| class="parameterTable" cellpadding="5%" width="100%" | ||
| + | ! width="20%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Parameter | ||
| + | ! width="60%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Explanation | ||
| + | ! width="20%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Data Type | ||
| + | |- | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|''nLine'' | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|The line to display on. 0 is the top, 1 is the bottom. | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|[[Data_Types#dataType_int|int]] | ||
| + | |- | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|''nPos'' | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|The position on 'nLine' to display from. | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|[[Data_Types#dataType_int|int]] | ||
| + | |- | ||
| + | |} | ||
| + | |- | ||
| + | | | ||
| + | {| | ||
| + | |- | ||
| + | |<syntaxhighlight lang="ROBOTC">displayLCDPos(0,0); // sets the next character position to the first character on line 1</syntaxhighlight> | ||
| + | |- | ||
| + | |} | ||
| + | |- | ||
| + | |} | ||
| + | <br /> | ||
| + | |||
| + | == displayLCDString == | ||
| + | {| style="color:black;" width="100%" cellpadding="5%" cellspacing="0" border="0" | ||
| + | |- | ||
| + | | class="functionType"| <span class="bigKeywordBI">void </span><span class="bigKeywordB">displayLCDString</span><span class="bigCodePunc">(</span><span class="bigKeywordBI">const int </span><span class="bigCodeBasic">nLine</span><span class="bigCodePunc">, </span><span class="bigKeywordBI">const int </span><span class="bigCodeBasic">nPos</span><span class="bigCodePunc">, </span><span class="bigKeywordBI">string </span><span class="bigCodeBasic">sString</span><span class="bigCodePunc">)</span> | ||
| + | |- | ||
| + | | style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;"|([[Data_Types#dataType_void|void]]) Displays a string sString on line nLine at position nPos. | ||
| + | |- | ||
| + | | | ||
| + | {| class="parameterTable" cellpadding="5%" width="100%" | ||
| + | ! width="20%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Parameter | ||
| + | ! width="60%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Explanation | ||
| + | ! width="20%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Data Type | ||
| + | |- | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|''nLine'' | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|The line to display on. 0 is the top, 1 is the bottom. | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|[[Data_Types#dataType_int|int]] | ||
| + | |- | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|''nPos'' | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|The position on 'nLine' to display from. | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|[[Data_Types#dataType_int|int]] | ||
| + | |- | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|''sString'' | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|The string to display. | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|[[Data_Types#dataType_string|string]] | ||
| + | |- | ||
| + | |} | ||
| + | |- | ||
| + | | | ||
| + | {| | ||
| + | |- | ||
| + | |<syntaxhighlight lang="ROBOTC"> | ||
| + | displayLCDString(0,0,"ROBOTC"); // displays the string "ROBOTC" starting from the first position | ||
| + | // on the first line</syntaxhighlight> | ||
| + | |- | ||
| + | |} | ||
| + | |- | ||
| + | |} | ||
| + | <br /> | ||
| + | |||
| + | == displayNextLCDChar == | ||
| + | {| style="color:black;" width="100%" cellpadding="5%" cellspacing="0" border="0" | ||
| + | |- | ||
| + | | class="functionType"| <span class="bigKeywordBI">void </span><span class="bigKeywordB">displayNextLCDChar</span><span class="bigCodePunc">(</span><span class="bigKeywordBI">const int </span><span class="bigCodeBasic">cChar</span><span class="bigCodePunc">)</span> | ||
| + | |- | ||
| + | | style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;"|([[Data_Types#dataType_void|void]]) Displays a specific character on the VEX LCD. | ||
| + | |- | ||
| + | | | ||
| + | {| class="parameterTable" cellpadding="5%" width="100%" | ||
| + | ! width="20%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Parameter | ||
| + | ! width="60%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Explanation | ||
| + | ! width="20%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Data Type | ||
| + | |- | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|''cChar'' | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|The char to display. Can be an int or char. | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|[[Data_Types#dataType_int|int]] | ||
| + | |- | ||
| + | |} | ||
| + | |- | ||
| + | | | ||
| + | {| | ||
| + | |- | ||
| + | |<syntaxhighlight lang="ROBOTC"> | ||
| + | displayLCDPos(1,5); // sets the current LCD position to line 2, character 6 | ||
| + | displayNextLCdChar('A'); // displays the character 'A' on line 2, character 6</syntaxhighlight> | ||
| + | |- | ||
| + | |} | ||
| + | |- | ||
| + | |} | ||
| + | <br /> | ||
| + | |||
| + | == displayNextLCDNumber == | ||
| + | {| style="color:black;" width="100%" cellpadding="5%" cellspacing="0" border="0" | ||
| + | |- | ||
| + | | class="functionType"| <span class="bigKeywordBI">void </span><span class="bigKeywordB">displayNextLCDNumber</span><span class="bigCodePunc">(</span><span class="bigKeywordBI">const int </span><span class="bigCodeBasic">nValue</span><span class="bigCodePunc">, </span><span class="bigKeywordBI">const int </span><span class="bigCodeBasic">nPrecision</span><span class="bigCodePunc"> = </span><span class="bigCodeStringsNums">0x40</span><span class="bigCodePunc">)</span> | ||
| + | |- | ||
| + | | style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;"|([[Data_Types#dataType_void|void]]) Displays a integer number on the VEX LCD. | ||
| + | |- | ||
| + | | | ||
| + | {| class="parameterTable" cellpadding="5%" width="100%" | ||
| + | ! width="20%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Parameter | ||
| + | ! width="60%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Explanation | ||
| + | ! width="20%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Data Type | ||
| + | |- | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|''nValue'' | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|The number to display. | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|[[Data_Types#dataType_int|int]] | ||
| + | |- | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|''nPrecision'' | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|The precision of the number. 64 by default. | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|[[Data_Types#dataType_int|int]] | ||
| + | |- | ||
| + | |} | ||
| + | |- | ||
| + | | | ||
| + | {| | ||
| + | |- | ||
| + | |<syntaxhighlight lang="ROBOTC">displayNextLCDNumber(2365); // displays the number '2365' onto the LCD screen</syntaxhighlight> | ||
| + | |- | ||
| + | |} | ||
| + | |- | ||
| + | |} | ||
| + | <br /> | ||
| + | |||
| + | == displayNextLCDString == | ||
| + | {| style="color:black;" width="100%" cellpadding="5%" cellspacing="0" border="0" | ||
| + | |- | ||
| + | | class="functionType"| <span class="bigKeywordBI">void </span><span class="bigKeywordB">displayNextLCDString</span><span class="bigCodePunc">(</span><span class="bigKeywordBI">string </span><span class="bigCodeBasic">sString</span><span class="bigCodePunc">)</span> | ||
| + | |- | ||
| + | | style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;"|([[Data_Types#dataType_void|void]]) Displays a integer number on the VEX LCD. | ||
| + | |- | ||
| + | | | ||
| + | {| class="parameterTable" cellpadding="5%" width="100%" | ||
| + | ! width="20%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Parameter | ||
| + | ! width="60%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Explanation | ||
| + | ! width="20%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Data Type | ||
| + | |- | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|''sString'' | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|The string to display. | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|[[Data_Types#dataType_string|string]] | ||
| + | |- | ||
| + | |} | ||
| + | |- | ||
| + | | | ||
| + | {| | ||
| + | |- | ||
| + | |<syntaxhighlight lang="ROBOTC">displayNextLCDString("ROBOT123"); // displays the string of text ROBOTC123 onto the LCD</syntaxhighlight> | ||
| + | |- | ||
| + | |} | ||
| + | |- | ||
| + | |} | ||
| + | <br /> | ||
| + | |||
| + | == setLCDPosition == | ||
| + | {| style="color:black;" width="100%" cellpadding="5%" cellspacing="0" border="0" | ||
| + | |- | ||
| + | | class="functionType"| <span class="bigKeywordBI">void </span><span class="bigKeywordB">setLCDPosition</span><span class="bigCodePunc">(</span><span class="bigKeywordBI">const int </span><span class="bigCodeBasic">nLine</span><span class="bigCodePunc">, </span><span class="bigKeywordBI">const int </span><span class="bigCodeBasic">nPos</span><span class="bigCodePunc">)</span> | ||
| + | |- | ||
| + | | style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;"|([[Data_Types#dataType_void|void]]) Sets the next display position on the VEX LCD. | ||
| + | |- | ||
| + | | | ||
| + | {| class="parameterTable" cellpadding="5%" width="100%" | ||
| + | ! width="20%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Parameter | ||
| + | ! width="60%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Explanation | ||
| + | ! width="20%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Data Type | ||
| + | |- | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|''nLine'' | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|The line to display on. 0 is the top, 1 is the bottom. | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|[[Data_Types#dataType_int|int]] | ||
| + | |- | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|''nPos'' | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|The position on 'nLine' to display from. | ||
| + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|[[Data_Types#dataType_int|int]] | ||
| + | |- | ||
| + | |} | ||
| + | |- | ||
| + | | | ||
| + | {| | ||
| + | |- | ||
| + | |<syntaxhighlight lang="ROBOTC">displayLCDPos(0,0); //Sets the next character position to the first character on line 1</syntaxhighlight> | ||
|- | |- | ||
|} | |} | ||
Latest revision as of 09:07, 30 April 2012
CORTEX → Functions and Variables → Display
| For information about ROBOTC string, please see the article: Strings. | ||||||||||||
|
Some display functions offer a precision parameter, which pads the displayed number with either zeros or spaces, until the number of digits is equal to the precision value:
Note: Underscore ( _ ) character denotes a space.
|
|
| |||||||
clearLCDLine
| void clearLCDLine(const int nLine) | ||||||
| (void) Clears the indicated line of the VEX LCD to blanks. | ||||||
| ||||||
|
displayLCDCenteredString
| void displayLCDCenteredString(const int nLine, string sString) | |||||||||
| (void) Clears the indicated line of the VEX LCD to blanks. | |||||||||
| |||||||||
|
displayLCDChar
| void displayLCDChar(const int nLine, const int nPos, const int cChar) | ||||||||||||
| (void) Clears the indicated line of the VEX LCD to blanks. | ||||||||||||
| ||||||||||||
|
displayLCDNumber
| void displayLCDNumber(const int nLine, const int nPos, const int nValue, const int nPrecision = -1) | |||||||||||||||
| (void) Displays a number nValue on line nLine at position nPos. | |||||||||||||||
| |||||||||||||||
|
displayLCDPos
| void displayLCDPos(const int nLine, const int nPos) | |||||||||
| (void) Sets the next display position on the VEX LCD. | |||||||||
| |||||||||
|
displayLCDString
| void displayLCDString(const int nLine, const int nPos, string sString) | ||||||||||||
| (void) Displays a string sString on line nLine at position nPos. | ||||||||||||
| ||||||||||||
|
displayNextLCDChar
| void displayNextLCDChar(const int cChar) | ||||||
| (void) Displays a specific character on the VEX LCD. | ||||||
| ||||||
|
displayNextLCDNumber
| void displayNextLCDNumber(const int nValue, const int nPrecision = 0x40) | |||||||||
| (void) Displays a integer number on the VEX LCD. | |||||||||
| |||||||||
|
displayNextLCDString
| void displayNextLCDString(string sString) | ||||||
| (void) Displays a integer number on the VEX LCD. | ||||||
| ||||||
|
setLCDPosition
| void setLCDPosition(const int nLine, const int nPos) | |||||||||
| (void) Sets the next display position on the VEX LCD. | |||||||||
| |||||||||
|