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


C++ Ucglib_ILI9341_18x240x320_HWSPI类代码示例

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


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

示例1: display_layout2_print_datetime

void display_layout2_print_datetime(Ucglib_ILI9341_18x240x320_HWSPI ucg) {
 if (getClock()){
  SERIAL_OUT.println("Refresh Clock "); 
  ucg.setFontMode(UCG_FONT_MODE_SOLID);
  ucg.setFont(FONT_SMALL);
  ucg.setFontPosTop();
  //NTP
  String dateAndTime = "";
  if (now() != prev2Display) { //update the display only if time has changed
    prev2Display = now();
    //NTP
    ////////////////////////////////////////////////////////////////////////////
    String Time = "";
    String Date = "";
    Time = digitalClockDisplay_simple();
    Date = digitalDataDisplay();
    //ucg.setFont(ucg_font_inr19_mf);
    ucg.setFont(ucg_font_helvB14_hf);
    ucg.setColor(0, 255, 255, 255);       // Bianco
    ucg.setPrintPos(160, 4);
    ucg.print(Date);
    //ucg.setFont(ucg_font_inb21_mr);
    ucg.setFont(ucg_font_helvB18_hf);
    ucg.setPrintPos(260, 4);
    ucg.print(Time);
    SERIAL_OUT.print("New Clock: "); SERIAL_OUT.println(Time);
  }
 }
}
开发者ID:fbeke,项目名称:souliss-smart-thermostat-WiFi,代码行数:29,代码来源:display2.cpp

示例2: display_layout1_background

void display_layout1_background(Ucglib_ILI9341_18x240x320_HWSPI ucg, float diff) {
  SERIAL_OUT.print("diff:"); SERIAL_OUT.println(diff);
  if (diff > 0) {
    //SFONDO ROSSO
    SERIAL_OUT.println("SFONDO ROSSO");
    ucg.setColor(1, 159, 33, 33); // RED for the background
  } else {
    //SFONDO BLU
    SERIAL_OUT.println("SFONDO BLU");
    ucg.setColor(1, 0, 73, 221); // BLUE for the background
  }
}
开发者ID:fbeke,项目名称:souliss-smart-thermostat-WiFi,代码行数:12,代码来源:display.cpp

示例3: display_print_splash_waiting_connection_peer

void display_print_splash_waiting_connection_peer(Ucglib_ILI9341_18x240x320_HWSPI ucg) {
  SERIAL_OUT.println("display_print_splash_waiting_connection_peer");
  ucg.setColor(0, 255, 255, 255);    // Bianco
  ucg.setFontMode(UCG_FONT_MODE_SOLID);
  ucg.setFont(FONT_SPLASH_SCREEN);
  ucg.setPrintPos(4, 28);
  ucg.println(SPLASH_PEER_LINE1);
  ucg.setPrintPos(4, 58);
  ucg.println(SPLASH_PEER_LINE2);
  ucg.setPrintPos(4, 88);
  ucg.print("IP ");
  ucg.print(WiFi.localIP());
}
开发者ID:fbeke,项目名称:souliss-smart-thermostat-WiFi,代码行数:13,代码来源:display.cpp

示例4: display_print_B1

//Stampa l'orologio. La zona B1 è quella in alto a sinistra
void display_print_B1(Ucglib_ILI9341_18x240x320_HWSPI ucg) {
  //NTP
  String dateAndTime = "";
  if (now() != prevDisplay) { //update the display only if time has changed
    prevDisplay = now();

    dateAndTime = digitalClockDisplay();
    ucg.setPrintPos(10, 20);
    ucg.setColor(0, 255, 255, 255);    // Bianco
    ucg.setFontMode(UCG_FONT_MODE_SOLID);
    ucg.setFont(ucg_font_inb16_mr);
    display_print_DateTime(ucg, dateAndTime);
  }
}
开发者ID:gitter-badger,项目名称:souliss-smart-thermostat-WiFi,代码行数:15,代码来源:display.cpp

示例5: display_layout1_print_B1_datetime

//Stampa l'orologio. La zona B1 è quella in alto a sinistra
void display_layout1_print_B1_datetime(Ucglib_ILI9341_18x240x320_HWSPI ucg) {

  ucg.setFontMode(UCG_FONT_MODE_SOLID);
  ucg.setFont(FONT_SMALL);
  ucg.setFontPosTop();
  //NTP
  String dateAndTime = "";
  if (now() != prevDisplay) { //update the display only if time has changed
    prevDisplay = now();
    ucg.setColor(0, 255, 255, 255);    // Bianco
    dateAndTime = digitalClockDisplay();
    ucg.setPrintPos(5, 5);
    display_layout1_print_DateTime(ucg, dateAndTime);
  }
}
开发者ID:fbeke,项目名称:souliss-smart-thermostat-WiFi,代码行数:16,代码来源:display.cpp

示例6: display_HomeScreen

void display_HomeScreen(Ucglib_ILI9341_18x240x320_HWSPI ucg, float temp, float setpoint) {

  //la funzione display_print_B1 aggiorna soltanto se l'orario è cambiato
  display_print_B1(ucg);

  //uso flag_onetime per visualizzare almeno una volta la schermata, anche in assenza di variazione di temperatura
  //flag_onetime_HomeScreen è rimessa a false display_setpointPage
  if (!flag_onetime_HomeScreen || arrotonda(temp) != arrotonda(temp_prec) || (arrotonda(setpoint) != arrotonda(setpoint_prec))) {


    ucg.setColor(102, 255, 0);    // Verde Chiaro
    ucg.setFontMode(UCG_FONT_MODE_SOLID);
   // ucg.setFont(ucg_font_inb21_mr);
    ucg.setPrintPos(15, 80);
   // ucg.setScale2x2();
    //ucg.setFont(ucg_font_logisoso38_tf);
    ucg.setFont(ucg_font_inb38_mr);
    ucg.print(temp, 1);
    //ucg.undoScale();
    ucg.setFont(ucg_font_inb16_mr);
    ucg.print("o");

    temp_prec = temp;
    setpoint_prec = setpoint;
    flag_onetime_HomeScreen = true;
    display_print_B3(ucg, SETPOINT_TEXT, setpoint);
    //     display_print_B1(ucg);
  }
}
开发者ID:gitter-badger,项目名称:souliss-smart-thermostat-WiFi,代码行数:29,代码来源:display.cpp

示例7: 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

示例8: 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

示例9: display_layout1_HomeScreen

void display_layout1_HomeScreen(Ucglib_ILI9341_18x240x320_HWSPI ucg, float temp, float hum, float setpoint, boolean bSystemOn, boolean bChildLock) {
  //ripristina la variabile bool. Viene fatto il clear della pagina ogni volta soltato una volta
  setOnetime_clear_SetpointPage();
  //uso flag_onetime per visualizzare almeno una volta la schermata, anche in assenza di variazione di temperatura
  //flag_onetime_HomeScreen è rimessa a false display_layout1_setpointPage
  //flag_initScreen è impostato true all'uscita dal menu
  if ( getUIChanged() || arrotonda(temp) != arrotonda(temp_prec) || (arrotonda(setpoint) != arrotonda(setpoint_prec))) {
    if (!flag_onetime_HomeScreen) {
      ucg.clearScreen();
      resetUIChanged();
      flag_onetime_HomeScreen = true;
    }


    ucg.setFontMode(UCG_FONT_MODE_SOLID);

    display_layout1_printBigChar(ucg, temp);

    temp_prec = temp;
    setpoint_prec = setpoint;

    if (!bChildLock) {
      display_layout1_print_B3(ucg, SETPOINT_TEXT, setpoint);
    } else
    {
      display_layout1_print_B3_ChildLock(ucg, CHILDLOCK_TEXT);
    }

    if (bSystemOn) {
      display_layout1_print_B4_Hum(ucg, HUM_TEXT, hum) ;
    }
    else
    {
      display_layout1_print_B4_SystemOff(ucg, SYSTEM_OFF_TEXT);
    }
    resetUIChanged();
  }
  //la funzione display_layout1_print_B1 aggiorna soltanto se l'orario è cambiato
  display_layout1_print_B1_datetime(ucg);
}
开发者ID:fbeke,项目名称:souliss-smart-thermostat-WiFi,代码行数:40,代码来源:display.cpp

示例10: display_print_splash_waiting_connection_gateway

void display_print_splash_waiting_connection_gateway(Ucglib_ILI9341_18x240x320_HWSPI ucg) {

  ucg.setColor(0, 255, 255, 255);    // Bianco
  ucg.setFontMode(UCG_FONT_MODE_SOLID);
  ucg.setFont(ucg_font_inb21_mr);
  ucg.setPrintPos(4, 28);
  ucg.println(SPLASH_GW_LINE1);
  ucg.println(SPLASH_GW_LINE2);
  ucg.print("IP ");
  ucg.print(WiFi.localIP());
}
开发者ID:gitter-badger,项目名称:souliss-smart-thermostat-WiFi,代码行数:11,代码来源:display.cpp

示例11: display_print_splash_waiting_need_configuration

void display_print_splash_waiting_need_configuration(Ucglib_ILI9341_18x240x320_HWSPI ucg) {

  ucg.setColor(0, 255, 255, 255);    // Bianco
  ucg.setFontMode(UCG_FONT_MODE_SOLID);
  ucg.setFont(ucg_font_inb21_mr);
  ucg.setPrintPos(4, 28);

  ucg.println(SPLASH_NEED_CONFIGURATION);
  ucg.print("IP ");
  ucg.print(WiFi.softAPIP());
}
开发者ID:gitter-badger,项目名称:souliss-smart-thermostat-WiFi,代码行数:11,代码来源:display.cpp

示例12: 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

示例13: display_print_B3

void display_print_B3(Ucglib_ILI9341_18x240x320_HWSPI ucg, String text, float temp) {

  ucg.setPrintPos(20, 220);
  ucg.setColor(102, 255, 0);    // Verde Chiaro
  ucg.setFontMode(UCG_FONT_MODE_SOLID);
  ucg.setFont(ucg_font_inb16_mr);
  ucg.print(text);
  ucg.print(temp, 1);
}
开发者ID:gitter-badger,项目名称:souliss-smart-thermostat-WiFi,代码行数:9,代码来源:display.cpp

示例14: display_print_setpoint

//Stampa soltanto il setpoint grande al centro del display
void display_print_setpoint(Ucglib_ILI9341_18x240x320_HWSPI ucg, float setpoint) {

  ucg.setColor(0, 255, 255, 255);    // Bianco
  ucg.setFontMode(UCG_FONT_MODE_SOLID);

  ucg.setPrintPos(4, 28);
  //ucg.setScale2x2();
  ucg.setFont(ucg_font_inb53_mr);
  ucg.print(setpoint, 1);

 // ucg.undoScale();
 // ucg.setPrintPos(280, 90);
  ucg.setFont(ucg_font_inb21_mr);
  ucg.print("°");
}
开发者ID:gitter-badger,项目名称:souliss-smart-thermostat-WiFi,代码行数:16,代码来源:display.cpp

示例15: display_layout1_setpointPage

//compone la pagina dedicata al setpoint
void display_layout1_setpointPage(Ucglib_ILI9341_18x240x320_HWSPI ucg, float setpoint, float temp, float hum, boolean bSystemOn) {
  SERIAL_OUT.println("display_setpointPage");

  if (!flag_onetime_clear_SetpointPage) {
    //viene ripristinata in homepage
    flag_onetime_clear_SetpointPage = true;
    ucg.clearScreen();
  }
  flag_onetime_HomeScreen = false;

  display_layout1_print_setpoint(ucg, setpoint);
  display_layout1_print_B3(ucg, TEMP_TEXT, temp) ;

  if (bSystemOn)
    display_layout1_print_B4_Hum(ucg, HUM_TEXT, hum) ;
  else
    display_layout1_print_B4_SystemOff(ucg, SYSTEM_OFF_TEXT) ;
}
开发者ID:fbeke,项目名称:souliss-smart-thermostat-WiFi,代码行数:19,代码来源:display.cpp


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