当前位置: 首页>>代码示例>>C++>>正文


C++ Ucglib_ILI9341_18x240x320_HWSPI::getHeight方法代码示例

本文整理汇总了C++中Ucglib_ILI9341_18x240x320_HWSPI::getHeight方法的典型用法代码示例。如果您正苦于以下问题:C++ Ucglib_ILI9341_18x240x320_HWSPI::getHeight方法的具体用法?C++ Ucglib_ILI9341_18x240x320_HWSPI::getHeight怎么用?C++ Ucglib_ILI9341_18x240x320_HWSPI::getHeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Ucglib_ILI9341_18x240x320_HWSPI的用法示例。


在下文中一共展示了Ucglib_ILI9341_18x240x320_HWSPI::getHeight方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: display_layout1_print_B4_SystemOff

void display_layout1_print_B4_SystemOff(Ucglib_ILI9341_18x240x320_HWSPI ucg, String text) {
  SERIAL_OUT.println("display_print_B4 [SystemOff]");
  ucg.setFontMode(UCG_FONT_MODE_SOLID);
  ucg.setFont(FONT_SMALL);
  ucg.setFontPosBaseline();
  setRosso(&ucg);
  ucg.setPrintPos(5, ucg.getHeight() - 5);
  ucg.print(text);
}
开发者ID:fbeke,项目名称:souliss-smart-thermostat-WiFi,代码行数:9,代码来源:display.cpp

示例2: display_layout1_print_B3_ChildLock

void display_layout1_print_B3_ChildLock(Ucglib_ILI9341_18x240x320_HWSPI ucg, String text) {
  SERIAL_OUT.println("display_print_B4 [ChildClocked]");
  SERIAL_OUT.println("display_print_B3");
  ucg.setFontMode(UCG_FONT_MODE_SOLID);
  ucg.setFont(FONT_SMALL);
  ucg.setFontPosBaseline();
  String str = text;
  const char * c = str.c_str();
  setRosso(&ucg);
  ucg.setPrintPos(ucg.getWidth() - ucg.getStrWidth(c) - 5, ucg.getHeight() - 5);
  ucg.print(text);
}
开发者ID:fbeke,项目名称:souliss-smart-thermostat-WiFi,代码行数:12,代码来源:display.cpp

示例3: display_layout1_print_B4_Hum

void display_layout1_print_B4_Hum(Ucglib_ILI9341_18x240x320_HWSPI ucg, String text, float temp) {
  SERIAL_OUT.println("display_print_B4 [Humidity]");
  SERIAL_OUT.println("display_print_B4 [Humidity]");
  ucg.setFontMode(UCG_FONT_MODE_SOLID);
  ucg.setFont(FONT_SMALL);
  ucg.setFontPosBaseline();
  ucg.setPrintPos(5, ucg.getHeight() - 5);
  setBlu(&ucg);
  ucg.print(text);
  ucg.print(temp, 1);
  ucg.print("%");
}
开发者ID:fbeke,项目名称:souliss-smart-thermostat-WiFi,代码行数:12,代码来源:display.cpp

示例4: display_layout1_print_B3

void display_layout1_print_B3(Ucglib_ILI9341_18x240x320_HWSPI ucg, String text, float temp) {
  SERIAL_OUT.println("display_print_B3");
  ucg.setFontMode(UCG_FONT_MODE_SOLID);
  ucg.setFont(FONT_SMALL);
  ucg.setFontPosBaseline();
  String str = text + "00.00";
  const char * c = str.c_str();

  ucg.setColor(102, 255, 0);    // Verde Chiaro
  ucg.setPrintPos(ucg.getWidth() - ucg.getStrWidth(c) - 5, ucg.getHeight() - 5);
  ucg.print(text);
  ucg.print(temp, 1);
  ucg.setFont(ucg_font_inb21_mr);
  ucg.print("°");
}
开发者ID:fbeke,项目名称:souliss-smart-thermostat-WiFi,代码行数:15,代码来源:display.cpp

示例5: display_layout1_printBigChar

void display_layout1_printBigChar(Ucglib_ILI9341_18x240x320_HWSPI ucg, float fValTemp) {
  ucg.setFont(FONT_BIG);
#if(FONT_BIG_SCALE2x2)
  ucg.setScale2x2();
#endif
  ucg.setFontPosBaseline();

  //calcolo ingombro testo
  String str = "00";
  const char *c = str.c_str();
  int vW = ucg.getStrWidth(c);

  str = "0";
  c = str.c_str();
  vW_pos_before_point = vW - ucg.getStrWidth(c) / 8; //arretra di un sesto dello spazio di un carattere, per avvicinare il punto
  ucg.setFont(FONT_BIG_MIN_50_PERCENT);
  str = ".";
  c = str.c_str();
  vW += ucg.getStrWidth(c);
  vW_pos_after_point = vW_pos_before_point + ucg.getStrWidth(c) - ucg.getStrWidth(c) / 8; //aggiunge lo spazio del punto meno un sesto
  str = "0";
  c = str.c_str();
  vW += ucg.getStrWidth(c);

  ucg.setFont(FONT_SMALL_CENTIGRAD);
  str = "o";
  c = str.c_str();
  vW += ucg.getStrWidth(c) / 2; //aggiunge metà dello spazio di un carattere. Il ° verrà parzialmente sovrapposto alla vifra decimale

  ucg.setFont(FONT_BIG);
  startW = (ucg.getWidth() - vW) / 2 ;
  baseH = ucg.getHeight() / 2 + ucg.getFontAscent() / 2;
  baseH_Grade = baseH - ucg.getFontAscent() + ucg.getFontAscent() / 6;
  ucg.setPrintPos(startW, baseH );
  sTempToPrint = (int) fValTemp;
  if (((int) fValTemp) <= -10) {
    sTempToPrint = "-- ";
    ucg.print(sTempToPrint);
    SERIAL_OUT.print("sTempToPrint: "); SERIAL_OUT.println(sTempToPrint);
  } else if (((int) fValTemp) >= 100) {
    sTempToPrint = "++ ";
    ucg.print(sTempToPrint);
    SERIAL_OUT.print("sTempToPrint: "); SERIAL_OUT.println(sTempToPrint);
  } else {

    if ((((int) fValTemp) < 10) && ((int) fValTemp > 0)) {
      sTempToPrint = " " + sTempToPrint;
      SERIAL_OUT.print("sTempToPrint: "); SERIAL_OUT.println(sTempToPrint);
    }

    ucg.print(sTempToPrint);
    ucg.setFont(FONT_BIG_MIN_50_PERCENT);
    ucg.setPrintPos(startW + vW_pos_before_point, baseH);
    int diff = dopovigola(fValTemp);
    ucg.print(".");
    ucg.setPrintPos(startW + vW_pos_after_point, baseH);
    ucg.print(diff);

    //print °

    ucg.setFont(FONT_SMALL_CENTIGRAD);
    vW_pos_grade = startW + vW_pos_after_point;   // - FONT_SHIFT_POSITION_TO_SX_CENTIGRAD ;
    ucg.setPrintPos(vW_pos_grade, baseH_Grade);
    ucg.print("o");
  }
#if(FONT_BIG_SCALE2x2)
  ucg.undoScale();
#endif

}
开发者ID:fbeke,项目名称:souliss-smart-thermostat-WiFi,代码行数:70,代码来源:display.cpp


注:本文中的Ucglib_ILI9341_18x240x320_HWSPI::getHeight方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。