本文整理汇总了C++中UTFT::drawLine方法的典型用法代码示例。如果您正苦于以下问题:C++ UTFT::drawLine方法的具体用法?C++ UTFT::drawLine怎么用?C++ UTFT::drawLine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UTFT
的用法示例。
在下文中一共展示了UTFT::drawLine方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: drawPrepareScreen
void PlugScreen::drawPrepareScreen()
{
Serial.println("PlugScreen::handlePlugScreen SET LIGHTS ID \n");
myUTFT.setFont(SmallFont);
myUTFT.clrScr();
myUTFT.setColor(255, 0, 0);
myUTFT.fillRect(0, 0, 220, 13);
myUTFT.setColor(255, 255, 255);
myUTFT.setBackColor(255, 0, 0);
myUTFT.drawLine(0, 14, 320, 14);
myUTFT.print("Plug Setting", CENTER, 1);
myUTFT.setBackColor(0, 0, 0);
myUTFT.print("Use the remote that came with your", LEFT, 30);
myUTFT.print("plugs to set which unit and address it", LEFT, 42);
myUTFT.print("uses.Just point the remote at the screen", LEFT, 54);
myUTFT.print("and press a button for the unit you want", LEFT, 66);
myUTFT.print("to use for the lights", LEFT, 78);
myUTFT.print("", LEFT, 90);
myUTFT.print("Please press a unit for the lights", LEFT, 102);
myUTFT.print("", LEFT, 114);
exitButton = myButtons.addButton( 10, 170, 145, 53, mainButton);
myButtons.drawButton(exitButton);
myUTFT.setBackColor (161,190,237);
myUTFT.print("Cancel", 55, 195);
myUTFT.setFont(BigFont);
}
示例2: dryCalibration
void ECCalibrateScreen::dryCalibration()
{
myUTFT.clrScr();
myUTFT.setColor(255, 0, 0);
myUTFT.fillRect(0, 0, 220, 13);
myUTFT.setColor(255, 255, 255);
myUTFT.setBackColor(255, 0, 0);
myUTFT.drawLine(0, 14, 320, 14);
myUTFT.print("EC Calibration", CENTER, 1);
myUTFT.setBackColor(0, 0, 0);
myUTFT.print("Do NOT put sensor in any Liquid you are", LEFT, 30);
myUTFT.print("going to calibrate for a dry condition", LEFT, 42);
myUTFT.print("This is much like setting a TARE on a", LEFT, 54);
myUTFT.print("scale", LEFT, 66);
myUTFT.print("", LEFT, 78);
myUTFT.print("Please make sure that the EC sensor is", LEFT, 90);
myUTFT.print("connected to the BNC connector before", LEFT, 102);
myUTFT.print("you continue", LEFT, 114);
//myUTFT.print("crosshairs in sequence.", LEFT, 126);
myUTFT.print("Touch screen to continue", CENTER, 162);
waitForTouch();
myUTFT.clrScr();
inputstring = "Z0\r"; //Command to get info
Serial3.print(inputstring); //send command to sensor.
}
示例3: highCalibration
void ECCalibrateScreen::highCalibration()
{
myUTFT.clrScr();
myUTFT.setColor(255, 0, 0);
myUTFT.fillRect(0, 0, 220, 13);
myUTFT.setColor(255, 255, 255);
myUTFT.setBackColor(255, 0, 0);
myUTFT.drawLine(0, 14, 320, 14);
myUTFT.print("EC Calibration", CENTER, 1);
myUTFT.setBackColor(0, 0, 0);
myUTFT.print("Calibrate now with the high side liquid", LEFT, 30);
myUTFT.print("Place the sensor in the 3,000Us ", LEFT, 42);
myUTFT.print("calibration liquid. This process", LEFT, 54);
myUTFT.print("will take 5 minutes to complete", LEFT, 66);
myUTFT.print("Wait for process to finish before ", LEFT, 78);
myUTFT.print("removing the sensor from the liquid", LEFT, 90);
myUTFT.print("", LEFT, 102);
myUTFT.print("************************************", LEFT, 114);
myUTFT.print("Touch screen to continue", CENTER, 162);
waitForTouch();
myUTFT.clrScr();
inputstring = "C\r"; //set in continious mode
myUTFT.clrScr();
String thisSt = String(iSeconds);
myUTFT.print("Calibration in Progress", CENTER, 30);
myUTFT.print("Seconds left until ready " + thisSt, CENTER, 42);
simpleTimer.setTimer(3000, updateWaitScreen, /*100*/ 4); //Update screen every 3 seconds for 5 minues.
}
示例4: waitForReceiver
void PlugScreen::waitForReceiver(NewRemoteCode receivedCode)
{
//Clear What was there.
myUTFT.setFont(SmallFont);
myUTFT.clrScr();
myUTFT.setColor(255, 0, 0);
myUTFT.fillRect(0, 0, 220, 13);
myUTFT.setColor(255, 255, 255);
myUTFT.setBackColor(255, 0, 0);
myUTFT.drawLine(0, 14, 320, 14);
myUTFT.print("ID Set", CENTER, 1);
myUTFT.setBackColor(0, 0, 0);
setAddresstoEEPROM(receivedCode.address);
if(plugDevice.lights)
{
EEPROM.write(EEPROM_LEARNED_LIGHTS_UNIT,receivedCode.unit);
plugDevice.lights = false;
}
if(plugDevice.pump)
{
EEPROM.write(EEPROM_LEARNED_PUMP_UNIT,receivedCode.unit);
plugDevice.pump = false;
}
if(plugDevice.heater)
{
EEPROM.write(EEPROM_LEARNED_HEATER_UNIT,receivedCode.unit);
plugDevice.heater = false;
}
//unsigned long add = getAddress();
String sAddress(receivedCode.address);
String slightID(receivedCode.unit);
myUTFT.print("The unit has been set to unit ", LEFT, 30);
myUTFT.print(slightID, LEFT, 42);
myUTFT.print("The Transmitting Address is", LEFT, 54);
myUTFT.print(sAddress, LEFT, 66);
myUTFT.print("You can now use the plug", LEFT, 78);
myUTFT.print("**********************************", LEFT, 90);
myButtons.deleteAllButtons();
exitButton = -1;
exitButton = myButtons.addButton( 10, 170, 145, 53, mainButton);
myButtons.drawButton(exitButton);
myUTFT.setBackColor (161,190,237);
myUTFT.print("Back", 55, 195);
myUTFT.setFont(BigFont);
}
示例5: lowCalibration
void ECCalibrateScreen::lowCalibration()
{
myUTFT.clrScr();
myUTFT.setColor(255, 0, 0);
myUTFT.fillRect(0, 0, 220, 13);
myUTFT.setColor(255, 255, 255);
myUTFT.setBackColor(255, 0, 0);
myUTFT.drawLine(0, 14, 320, 14);
myUTFT.print("EC Calibration", CENTER, 1);
myUTFT.setBackColor(0, 0, 0);
myUTFT.print("Calibrate now with the low side liquid", LEFT, 30);
myUTFT.print("Place the sensor in the 220Us", LEFT, 42);
myUTFT.print("calibration liquid. This process", LEFT, 54);
myUTFT.print("will take 5 mins to complete", LEFT, 66);
myUTFT.print("Wait for process to finish before ", LEFT, 78);
myUTFT.print("removing the sensor from the liquid", LEFT, 90);
myUTFT.print("", LEFT, 102);
myUTFT.print("************************************", LEFT, 114);
myUTFT.print("Touch screen to continue", CENTER, 162);
SwaitForTouch();
myUTFT.clrScr();
inputstring = "C\r"; //set in continious mode
String thisSt = String(12);
myUTFT.print("Calibration in Progress", CENTER, 30);
myUTFT.print("Seconds left until ready " + thisSt, CENTER, 42);
simpleTimer.setTimer(3000, updateLowWaitScreen, /*100*/ 4); //Update screen every 3 seconds for 5 minues.
//delay(2000); //Wait 2 seconds -- make 5mins
//Serial3.print(inputstring); //send command to sensor.
//inputstring = "Z2\r"; //set the sensor at this value.
//Serial3.print(inputstring); //need to send twice??
}