// --------------------------------------------------------------------------- void draw_Info() { Screen_DrawBorder(_lng(INFORMATION_TITLE)); char buffer[32]; int is_conn = IP_Get(buffer); long usb_size = 0; int usb_used = 0; int usb_conn = Disk_GetStat(USB_PATH, &usb_size, &usb_used); GLCDD_Rect r; r.x = 6; r.w = SCREEN_W - 12; r.h = -1; r.y = 14; GLCDD_Printf(fnt_dejavu_9, &r, "%s: %s", _lng(IP), is_conn ? buffer : _lng(NOT_AVAILABLE)); sprintf(buffer, "%ldGB (%d%% %s)", usb_size, 100 - usb_used, _lng(FREE)); r.y = 26; GLCDD_Printf(fnt_dejavu_9, &r, "%s: %s", _lng(USB), usb_conn ? buffer : _lng(NOT_CONNECTED)); r.y = 38; GLCDD_Printf(fnt_dejavu_9, &r, "%s: %s", _lng(VERSION), FW_VERSION); GLCDD_RectRounded(SCREEN_W - 28, SCREEN_H - 14, 24, 10, 1); fnt_dejavu_9->color = 1; r.x = SCREEN_W - 21; r.y = SCREEN_H - 13; r.w = 12; r.h = -1; GLCDD_Print(fnt_dejavu_9, &r, _lng(OK)); fnt_dejavu_9->color = 0; }
void displayHumidityScreenLive(){ displayBorder(); int i; GLCDD_Rect r; r.w = 128 - 10; //r.h = -1; r.h = 5; // Humidity r.x = 20; r.y = 12; GLCDD_Printf(fnt_spaceLex_5, 0, &r, "HUMIDITY LIVE"); for (i=0; i < 108; i++){ Data data; data=bufferPop(buffer); drawPoint(data.humidity.current); } }
void displayECScreenLive(int sensorID){ displayBorder(); int i; GLCDD_Rect r; r.w = 128 - 10; //r.h = -1; r.h = 5; // Humidity r.x = 20; r.y = 12; GLCDD_Printf(fnt_spaceLex_5, 0, &r, "EC-LEVEL %d LIVE", sensorID); for (i=0; i < 108; i++){ Data data; data=bufferPop(buffer); drawPoint(data.ecLevel[sensorID].current); } }
void displayTemperatureScreenLive(int sensorID){ displayBorder(); int i; GLCDD_Rect r; r.w = 128 - 10; //r.h = -1; r.h = 5; // Humidity r.x = 20; r.y = 12; GLCDD_Printf(fnt_spaceLex_5, 0, &r, "TEMPERATURE %d LIVE", sensorID); for (i=0; i < 108; i++){ Data data; data=bufferPop(buffer); drawPoint(data.temperature[sensorID].current); } }
void displayBorder(){ //GLCDD_Line(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2) GLCDD_Rect r; r.x = 6; r.w = 128 - 12; r.h = -1; fnt_spaceLex_5=createFont(spaceLex_5); //GLCDD_Rectangle(0, 9, 128, 16, 0); //GLCDD_Rectangle(2, 11, 124, 12, 0); r.x = 1; r.y = 17; r.w = GLCDD_StringWidth(fnt_spaceLex_5, "40"); GLCDD_Printf(fnt_spaceLex_5, 0, &r, "40"); r.y = 27; r.w = GLCDD_StringWidth(fnt_spaceLex_5, "30"); GLCDD_Printf(fnt_spaceLex_5, 0, &r, "30"); r.y = 37; r.w = GLCDD_StringWidth(fnt_spaceLex_5, "20"); GLCDD_Printf(fnt_spaceLex_5, 0, &r, "20"); r.y = 47; r.w = GLCDD_StringWidth(fnt_spaceLex_5, "10"); GLCDD_Printf(fnt_spaceLex_5, 0, &r, "10"); // Vertikale Linie GLCDD_Line(10,20,10,60); // 40 GLCDD_Line(8,20,10,20); // 35 GLCDD_Line(9,25,10,25); // 30 GLCDD_Line(8,30,10,30); // 25 GLCDD_Line(9,35,10,35); // 20 GLCDD_Line(8,40,10,40); // 15 GLCDD_Line(9,45,10,45); // 10 GLCDD_Line(8,50,10,50); // 5 GLCDD_Line(9,55,10,55); // Horizontale Linie GLCDD_Line(10,60,118,60); curPos = 10; }