Tahoma working with dropdown

This commit is contained in:
2025-11-16 09:52:56 +01:00
parent d11f49a43d
commit 4240db93d5
1778 changed files with 839466 additions and 1118 deletions
+7 -1
View File
@@ -71,5 +71,11 @@
"actions.h": "c",
"glbldata.h": "c",
"vars.h": "c"
}
},
"C_Cpp.clang_format_fallbackStyle": "{ BasedOnStyle: WebKit, ColumnLimit: 250 }",
"C_Cpp.clang_format_style": "{ BasedOnStyle: WebKit, ColumnLimit: 250 }",
"editor.wordWrapColumn": 250,
"html.format.wrapLineLength": 250,
"C_Cpp.vcFormat.wrap.preserveBlocks": "oneLiners",
"C_Cpp.formatting": "vcFormat"
}
+7 -1
View File
@@ -77,6 +77,12 @@
"actions.h": "c",
"glbldata.h": "c",
"vars.h": "c"
}
},
"C_Cpp.clang_format_fallbackStyle": "{ BasedOnStyle: WebKit, ColumnLimit: 250 }",
"C_Cpp.clang_format_style": "{ BasedOnStyle: WebKit, ColumnLimit: 250 }",
"editor.wordWrapColumn": 250,
"html.format.wrapLineLength": 250,
"C_Cpp.vcFormat.wrap.preserveBlocks": "oneLiners",
"C_Cpp.formatting": "vcFormat"
}
}
@@ -176,7 +176,7 @@ uint8_t TouchDrvCST92xx::getPoint(int16_t *x_array, int16_t *y_array, uint8_t ge
}
*/
for (uint8_t i = 0; i < numPoints; ++i) {
for (uint8_t i = 0; i < 1; ++i) {
uint8_t *data = read_buffer + (i * 5) + (i == 0 ? 0 : 2);
parseFingerData(data, &point_info[i]);
x_array[i] = point_info[i].x;
+2 -2
View File
@@ -14,8 +14,8 @@ board = seeed_xiao_esp32c3
monitor_speed = 115200
framework = arduino
board_build.partitions = min_spiffs.csv
;upload_protocol = espota
;upload_port = TMP-EG-WoZi.fritz.box
upload_protocol = espota
upload_port = TMP-EG-WoZi.fritz.box
lib_deps =
moononournation/GFX Library for Arduino@^1.5.3
lvgl/lvgl@^9.2.2
+11 -11
View File
@@ -481,12 +481,12 @@
/*Montserrat fonts with ASCII range and some symbols using bpp = 4
*https://fonts.google.com/specimen/Montserrat*/
#define LV_FONT_MONTSERRAT_8 0
#define LV_FONT_MONTSERRAT_10 1
#define LV_FONT_MONTSERRAT_10 0
#define LV_FONT_MONTSERRAT_12 0
#define LV_FONT_MONTSERRAT_14 1
#define LV_FONT_MONTSERRAT_14 0
#define LV_FONT_MONTSERRAT_16 0
#define LV_FONT_MONTSERRAT_18 0
#define LV_FONT_MONTSERRAT_20 1
#define LV_FONT_MONTSERRAT_20 0
#define LV_FONT_MONTSERRAT_22 0
#define LV_FONT_MONTSERRAT_24 0
#define LV_FONT_MONTSERRAT_26 0
@@ -495,7 +495,7 @@
#define LV_FONT_MONTSERRAT_32 0
#define LV_FONT_MONTSERRAT_34 0
#define LV_FONT_MONTSERRAT_36 0
#define LV_FONT_MONTSERRAT_38 1
#define LV_FONT_MONTSERRAT_38 0
#define LV_FONT_MONTSERRAT_40 0
#define LV_FONT_MONTSERRAT_42 0
#define LV_FONT_MONTSERRAT_44 0
@@ -515,10 +515,10 @@
/*Optionally declare custom fonts here.
*You can use these fonts as default font too and they will be available globally.
*E.g. #define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(my_font_1) LV_FONT_DECLARE(my_font_2)*/
#define LV_FONT_CUSTOM_DECLARE
#define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(symbol_font_10) LV_FONT_DECLARE(symbol_font_12) LV_FONT_DECLARE(symbol_font_16) LV_FONT_DECLARE(symbol_font_36)
/*Always set a default font*/
#define LV_FONT_DEFAULT &lv_font_montserrat_14
#define LV_FONT_DEFAULT &symbol_font_12
/*Enable handling large font and/or fonts with a lot of characters.
*The limit depends on the font size, font face and bpp.
@@ -586,7 +586,7 @@
#define LV_USE_ARC 1
#define LV_USE_BAR 0
#define LV_USE_BAR 1
#define LV_USE_BUTTON 1
@@ -611,9 +611,9 @@
#define LV_USE_CHART 1
#define LV_USE_CHECKBOX 0
#define LV_USE_CHECKBOX 1
#define LV_USE_DROPDOWN 0 /*Requires: lv_label*/
#define LV_USE_DROPDOWN 1 /*Requires: lv_label*/
#define LV_USE_IMAGE 1 /*Requires: lv_label*/
@@ -638,13 +638,13 @@
#define LV_USE_MENU 0
#define LV_USE_MSGBOX 0
#define LV_USE_MSGBOX 1
#define LV_USE_ROLLER 0 /*Requires: lv_label*/
#define LV_USE_SCALE 1
#define LV_USE_SLIDER 0 /*Requires: lv_bar*/
#define LV_USE_SLIDER 1 /*Requires: lv_bar*/
#define LV_USE_SPAN 1
#if LV_USE_SPAN
+3 -5
View File
@@ -28,10 +28,8 @@
MQTT mqtt;
Ticker measurementTick;
Tahoma tahoma("1215-2900-8489.local","67ebd23e3a61763386d9");
unsigned char ChipID = 0x00;
volatile bool TouchEventFlag = false;
float barometerAltitude = 730.0; // meters ... map readings + barometer position
//using namespace MDO;
/*定义ESP32的SPI使用的引脚*/
@@ -123,7 +121,6 @@ void setup(void)
measurementTick.attach(MEASINT_S,measure);
mqtt.begin();
getLocalTime(&glblData.bootTime);
//lv_label_set_text_fmt(objects.debugTxt, "IP:\n %s\n\nHostname:\n %s\n\nMqtt-Server:\n %s\n\nMqtt-Port:\n %d\n\nMqtt-Topic:\n %s\n\nHeatBuffer:\n %d",glblData.myIP,Settings::prefs.hostname,Settings::prefs.mqtt_server,Settings::prefs.mqtt_port, Settings::prefs.mqtt_topic,glblData.enBuff);
measure();
esp_reset_reason_t reason = esp_reset_reason();
if ((reason != ESP_RST_DEEPSLEEP) && (reason != ESP_RST_SW)) {
@@ -143,7 +140,7 @@ void loop()
{
if(newMeasurement){
esp_task_wdt_reset();
update_sensorNstatus(temp, hum, seaLevelPress,presAlarm);
update_sensor(temp, hum, seaLevelPress,presAlarm);
test = glblData.settemp;
newMeasurement = false;
mqtt.sendStatus();
@@ -160,8 +157,9 @@ void loop()
}
}
if(millis() - secondsTick > 1000){
checkTahomaActions();
secondsTick = millis();
update_clockdots();
update_status();
}
mqtt.loop();
ui_tick();
+159 -101
View File
@@ -1,121 +1,179 @@
#include "tahoma.h"
const char* rootCACertificate =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\
"pOPnPjqG16TQ7ju2iYonhoHPd/iWs7iKcBs8/eaMYxcpqQDbX+O6hN5qPcTBfGRB\n"\
"TFqwgSu0abNIZ3IJuSUGxkoPcIxNWLTxnwCgUN+TQTrg6rWw8T7GtSzKBljVk09R\n"\
"9YmKHPhUN7wjNRzWiecfomTi3FTgYbrzbwCSTj3FAogCxuHAwA==\n"\
"-----END CERTIFICATE-----\n";
Tahoma::Tahoma(const String _hostname, const String _token) : connected(false) {
hostname = _hostname;
token = _token;
}
extern constexpr char Tahoma::serverURL[];
extern Tahoma::rolloCommand_t Tahoma::movement[];
Tahoma::Tahoma(void) {}
// Destructor
Tahoma::~Tahoma() {
}
Tahoma::~Tahoma() {}
String url_encode(const String &value) {
String escaped;
for (uint16_t i = 0; i < value.length(); i++) {
char c = value.charAt(i);
// Keep alphanumeric and other accepted characters intact
if (isalnum(c) || c == '-' || c == '_' || c == '.' || c == '~') {
escaped += c;
continue;
}else{
// Any other characters are percent-encoded
if(c < 0x10){
escaped += "%0" + String(c, HEX);
}else{
escaped += '%' + String(c, HEX);
}
}
}
return escaped;
}
String Tahoma::getDeviceName(const String _url)
{
//String url = "/enduser-mobile-web/1/enduserAPI/apiVersion"; // Construct the URL to fetch the device name
uint8_t Tahoma::getMyDevices(bool _force_update) {
if (!numDevs || _force_update) {
HTTPClient http; // Create an HTTP client object
String url = "/enduser-mobile-web/1/enduserAPI/setup/devices/" + url_encode(_url) + "/states/core:NameState"; // Construct the URL to fetch the device name
String deviceName;
http.begin("1215-2900-8489.local",8443,url,rootCACertificate); // Initialize the HTTP connection
http.addHeader("Authorization", "Bearer " + token); // Add the authorization header with the token
String url = serverURL;
url += "?action=myactors"; // Construct the URL to fetch all devices
http.begin(url); // Initialize the HTTP connection
int httpCode = http.GET(); // Send the GET request and get the response code
if (httpCode > 0) { // Check if the request was successful
JsonDocument doc; // Create a JSON document to parse the response
String response = http.getString(); // Get the response as a string
deserializeJson(doc,response); // Deserialize the JSON response
Serial.println(response); // Print the response to the serial monitor for debugging
if (doc["value"].isNull()) { // Check if the value is null
Serial.println("Device not found"); // Print error message if the device is not found
}else{
deviceName = doc["value"].as<String>(); // Get the device name from the JSON response
Serial.println("Device Name: " + deviceName); // Print the device name to the serial monitor
if (httpCode > 0) { // Check if the request was successful
JsonDocument doc; // Create a JSON document to parse the response
String response = http.getString(); // Get the response as a string
deserializeJson(doc, response); // Deserialize the JSON response
if (doc.size() > 0) { // Check if the JSON document is not empty
for (int i = 0; i < doc.size(); i++) { // Loop through the JSON array
if (i >= MAX_NUM_DEVICES) { // Check if the maximum number of devices
// is reached
break; // Break the loop if the maximum number of devices is reached
}
devicelist[i].name =
doc[i]["name"]
.as<String>(); // Get the device URL from the JSON response
devicelist[i].index = doc[i]["id"];
numDevs++;
}
}
} else {
Serial.print("Error on HTTP request:"); // Print error message if the request failed
Serial.println(httpCode); // Print the error code
Serial.print("Error message: "); // Print error message
Serial.println(http.errorToString(httpCode)); // Print the error code
Serial.println(url); // Print the URL for debugging
Serial.print("Error on HTTP request:"); // Print error message if the
// request failed
Serial.println(httpCode); // Print the error code
Serial.print("Error message: "); // Print error message
Serial.println(http.errorToString(httpCode)); // Print the error code
}
http.end(); // Close the HTTP connection
return deviceName; // Return the device name
}
return numDevs;
}
void Tahoma::getAllDevices(void){
Tahoma::rolloCommand_t Tahoma::getPos(int8_t deviceIndex) {
rolloCommand_t pos = {0};
if (deviceIndex == -1)
deviceIndex = currentDevIndex;
if (deviceIndex < numDevs) {
HTTPClient http; // Create an HTTP client object
String url = "/enduser-mobile-web/1/enduserAPI/setup/devices/controllables/io%3AExteriorVenetianBlindIOComponent"; // Construct the URL to fetch all devices
http.begin("1215-2900-8489.local",8443,url,rootCACertificate); // Initialize the HTTP connection
http.addHeader("Authorization", "Bearer " + token); // Add the authorization header with the token
String url = serverURL;
url += "?action=pos&device=" +
String(devicelist[deviceIndex]
.index); // Construct the URL to fetch all devices
Serial.println(url);
http.begin(url); // Initialize the HTTP connection
int httpCode = http.GET(); // Send the GET request and get the response code
if (httpCode > 0) { // Check if the request was successful
JsonDocument doc; // Create a JSON document to parse the response
String response = http.getString(); // Get the response as a string
deserializeJson(doc,response); // Deserialize the JSON response
if(doc.size() > 0){ // Check if the JSON document is not empty
for (int i = 0; i < doc.size(); i++) { // Loop through the JSON array
devicelist[i].url = doc[i].as<String>(); // Get the device URL from the JSON response
Serial.println("Device URL: " + devicelist[i].url); // Print the device URL to the serial monitor
}
}
if (httpCode > 0) { // Check if the request was successful
JsonDocument doc; // Create a JSON document to parse the response
String response = http.getString(); // Get the response as a string
if (!deserializeJson(doc, response)) { // Check if the JSON was decoded wthout error
Serial.println("doc has content");
pos.rotation = doc["rotation"].as<uint8_t>(); // Get the device URL from the JSON response
pos.position = doc["position"].as<uint8_t>();
Serial.println(pos.rotation);
Serial.println(pos.position);
}
} else {
Serial.print("Error on HTTP request:"); // Print error message if the request failed
Serial.println(httpCode); // Print the error code
Serial.print("Error message: "); // Print error message
Serial.println(http.errorToString(httpCode)); // Print the error code
Serial.print("Error on HTTP request:"); // Print error message if the
// request failed
Serial.println(httpCode); // Print the error code
Serial.print("Error message: "); // Print error message
Serial.println(http.errorToString(httpCode)); // Print the error code
}
http.end(); // Close the HTTP connection
}
return pos;
}
void Tahoma::getAllDeviceNames(void){
for (int i = 0; i < MAX_NUM_DEVICES; i++) { // Loop through the JSON array
if(devicelist[i].url == ""){ // Check if the device URL is empty
break; // Break the loop if the device URL is empty
}
devicelist[i].name = getDeviceName(devicelist[i].url); // Get the device name using the device URL
}
bool Tahoma::checkMovement(uint8_t deviceIndex) {
bool ret = true;
HTTPClient http; // Create an HTTP client object
String url = serverURL;
url += "?action=moving&device=" +
String(devicelist[deviceIndex]
.index); // Construct the URL to fetch all devices
http.begin(url); // Initialize the HTTP connection
int httpCode = http.GET(); // Send the GET request and get the response code
if (httpCode > 0) { // Check if the request was successful
String response = http.getString(); // Get the response as a string
if (response == "false") {
ret = false;
}
} else {
}
http.end(); // Close the HTTP connection
return ret;
}
uint8_t Tahoma::sendMove(uint8_t deviceIndex, uint8_t position,
uint8_t rotation) {
uint8_t ret = 0;
HTTPClient http; // Create an HTTP client object
if (deviceIndex > MAX_NUM_DEVICES || position > 100 || rotation > 100) {
return 0; // invalid parameters
}
String url = serverURL;
if (position != 0 && rotation > 20) {
movement[deviceIndex].position = position;
movement[deviceIndex].rotation = rotation;
rotation = 0;
}
url = url + "?action=move&pos=" + String(position) +
"&angle=" + String(rotation) + "&device=" +
String(devicelist[deviceIndex]
.index); // Construct the URL to fetch all devices
http.begin(url); // Initialize the HTTP connection
int httpCode = http.GET(); // Send the GET request and get the response code
if (httpCode > 0) { // Check if the request was successful
String response = http.getString(); // Get the response as a string
if (response.indexOf("stop") != -1) {
movement[deviceIndex].position = 0;
}
ret = 1;
} else {
movement[deviceIndex].position = 0;
/*Serial.print(
"Error on HTTP request:"); // Print error message if the request failed
Serial.println(httpCode); // Print the error code
Serial.print("Error message: "); // Print error message
Serial.println(http.errorToString(httpCode)); // Print the error code*/
ret = 0;
}
http.end(); // Close the HTTP connection
return ret;
}
uint8_t Tahoma::sendfinalRot(uint8_t deviceIndex) {
uint8_t ret = 0;
HTTPClient http; // Create an HTTP client object
String url = serverURL;
if (movement[deviceIndex].position == 0) {
return 0; // no movement stored
}
url = url + "?action=move&pos=" + String(movement[deviceIndex].position) +
"&angle=" + String(movement[deviceIndex].rotation) + "&device=" +
String(devicelist[deviceIndex]
.index); // Construct the URL to fetch all devices
http.begin(url); // Initialize the HTTP connection
int httpCode = http.GET(); // Send the GET request and get the response code
if (httpCode > 0) { // Check if the request was successful
movement[deviceIndex].position = 0;
ret = 1;
} else {
ret = 0;
}
http.end(); // Close the HTTP connection
return ret;
}
void Tahoma::setCurrentDev(uint8_t i) {
if (i <= numDevs) {
currentDevIndex = i;
}
}
uint8_t Tahoma::getCurrentDev() { return currentDevIndex; }
void Tahoma::loop(void) {
for (uint8_t i = 0; i < numDevs; i++) {
if (movement[i].position != 0) {
Serial.print(devicelist[i].index);
if (!checkMovement(i)) {
sendfinalRot(i);
}
}
}
}
+26 -15
View File
@@ -4,36 +4,47 @@
#include <Arduino.h>
#include <WiFi.h>
#include <iostream>
#include <base64.h>
#include <HTTPClient.h>
#include <Ticker.h>
#include <ArduinoJson.h> // Include the ArduinoJson library for JSON parsing
#include <ESPAsyncWebserver.h>
#include <WiFiClientSecure.h>
#define MAX_NUM_DEVICES 32 // Maximum number of devices to fetch
#define MAX_NUM_DEVICES 5 // Maximum number of devices to fetch
class Tahoma {
public:
typedef union {
uint16_t movement;
struct {
uint16_t position : 8;
uint16_t rotation : 8;
};
} rolloCommand_t;
typedef struct {
String name; // Device name
String url; // Device URL
uint16_t index; // Device URL
} device_t;
// Constructor with hostname and token
// Initializes the Tahoma object with the provided hostname and token
Tahoma(const String hostname, const String token);
Tahoma(void);
// Destructor
~Tahoma();
void getAllDevices(void); // Fetches the device name from the Tahoma system
String getDeviceName(const String _url); // Fetches the device name from the Tahoma system
void getAllDeviceNames(void); // Fetches all device names from the Tahoma system
private:
uint8_t getMyDevices(bool _force_update=false); // Fetches the device name from the Tahoma system
rolloCommand_t getPos(int8_t deviceIndex=-1);
uint8_t sendMove(uint8_t deviceIndex, uint8_t position, uint8_t rotation);
uint8_t sendfinalRot(uint8_t deviceIndex);
void setCurrentDev(uint8_t i);
uint8_t getCurrentDev();
void loop(void);
device_t devicelist[MAX_NUM_DEVICES];
String hostname; // Hostname of the Tahoma system
String token; // Authentication token for the Tahoma system
bool connected; // Connection status
uint8_t numDevs{0};
static rolloCommand_t movement[MAX_NUM_DEVICES];
private:
uint8_t currentDevIndex{0};
bool checkMovement(uint8_t deviceIndex);
static constexpr char serverURL[]{"http://nas.local/smart/ajax/tahoma.php"}; // Hostname of the Tahoma system
Ticker movementCheckTicker;
// Simulate fetching data from the Tahoma system
void fetchData();
};
#endif // TAHOMA_H
File diff suppressed because it is too large Load Diff
-319
View File
@@ -1,319 +0,0 @@
/*******************************************************************************
* Size: 12 px
* Bpp: 4
* Opts: --bpp 4 --size 12 --no-compress --font bootstrap-icons.woff --range 63001-63004,62219-62221,62611,61829-61832,62719,62711,63478,62925-62930 --format lvgl -o Bootstrap_Icons_12.c
******************************************************************************/
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif
#ifndef BOOTSTRAP_ICONS_12
#define BOOTSTRAP_ICONS_12 1
#endif
#if BOOTSTRAP_ICONS_12
/*-----------------
* BITMAPS
*----------------*/
/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
/* U+F185 "" */
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0xb4, 0x0, 0x0, 0x8c, 0xcc, 0x5b, 0xf1,
0xcc, 0x20, 0xc3, 0x80, 0xaf, 0xb0, 0x14, 0x70,
0xc7, 0x69, 0xff, 0xfe, 0x33, 0x6c, 0xc6, 0x3e,
0xff, 0xf9, 0x63, 0x6d, 0xc3, 0x10, 0xbf, 0xa1,
0x74, 0x70, 0x8c, 0xc2, 0xfa, 0x4c, 0xcc, 0x20,
0x0, 0x4, 0xb0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0,
/* U+F186 "" */
0x2, 0x33, 0x33, 0x33, 0x31, 0x0, 0x9a, 0x88,
0x88, 0x88, 0x8b, 0x30, 0xc3, 0xbb, 0xbb, 0xbb,
0xb0, 0x72, 0xc5, 0xff, 0xff, 0xff, 0xf1, 0x6e,
0xc5, 0xff, 0xff, 0xff, 0xf1, 0x6a, 0xc0, 0x44,
0x44, 0x44, 0x43, 0x70, 0x3b, 0xcc, 0xcc, 0xcc,
0xca, 0x10,
/* U+F187 "" */
0x8c, 0xcc, 0xcc, 0xcc, 0xcd, 0x40, 0xc, 0x38,
0x88, 0x30, 0x0, 0x1b, 0x0, 0xc7, 0xff, 0xf7,
0x0, 0x0, 0xbd, 0x1c, 0x7f, 0xff, 0x70, 0x0,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,
0x0, 0x0, 0x0, 0x99, 0x0, 0x0,
/* U+F61B "" */
0x0, 0x0, 0x0, 0x0, 0x2, 0x60, 0x0, 0x16,
0x9b, 0xb7, 0x2c, 0x20, 0x9, 0xc6, 0x20, 0x1,
0xc3, 0x80, 0x64, 0x1, 0x55, 0x2c, 0x20, 0x55,
0x0, 0x8c, 0x70, 0xc2, 0xa8, 0x0, 0x0, 0x30,
0x2c, 0x30, 0x3, 0x0, 0x0, 0x2, 0xc2, 0x6b,
0x30, 0x0, 0x0, 0x2c, 0x23, 0x30, 0x0, 0x0,
0x0, 0xc2, 0x9, 0x90, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0,
/* U+F61C "" */
0x0, 0x16, 0xab, 0xb9, 0x50, 0x0, 0x1a, 0xb5,
0x20, 0x2, 0x6c, 0x80, 0x73, 0x4, 0x8b, 0xb8,
0x20, 0x64, 0x0, 0xb9, 0x31, 0x4, 0xb9, 0x0,
0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x2,
0x9b, 0xb9, 0x20, 0x0, 0x0, 0x0, 0x3, 0x30,
0x0, 0x0, 0x0, 0x0, 0x9, 0x90, 0x0, 0x0,
/* U+F7F6 "" */
0x0, 0x6, 0x91, 0x0, 0x0, 0x0, 0x6, 0xfc,
0x0, 0x0, 0x0, 0x8, 0xff, 0x60, 0x0, 0x0,
0x2f, 0xff, 0xb2, 0x0, 0x1, 0xef, 0xff, 0xcc,
0x70, 0xc, 0xff, 0xe9, 0xff, 0xf0, 0x4f, 0xff,
0x73, 0xff, 0xf5, 0x7f, 0xf7, 0x30, 0x8f, 0xf7,
0x6f, 0xd0, 0x0, 0xe, 0xf6, 0x2f, 0xd0, 0x0,
0xd, 0xf2, 0x8, 0xf4, 0x0, 0x4f, 0x80, 0x0,
0x5c, 0xcc, 0xc5, 0x0
};
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
{.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
{.bitmap_index = 0, .adv_w = 192, .box_w = 12, .box_h = 10, .ofs_x = 0, .ofs_y = 1},
{.bitmap_index = 60, .adv_w = 192, .box_w = 12, .box_h = 7, .ofs_x = 0, .ofs_y = 3},
{.bitmap_index = 102, .adv_w = 192, .box_w = 13, .box_h = 6, .ofs_x = 0, .ofs_y = 3},
{.bitmap_index = 141, .adv_w = 192, .box_w = 13, .box_h = 6, .ofs_x = 0, .ofs_y = 3},
{.bitmap_index = 180, .adv_w = 192, .box_w = 10, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 240, .adv_w = 192, .box_w = 10, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 300, .adv_w = 192, .box_w = 10, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 360, .adv_w = 192, .box_w = 11, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 426, .adv_w = 192, .box_w = 8, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 478, .adv_w = 192, .box_w = 10, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 538, .adv_w = 192, .box_w = 6, .box_h = 13, .ofs_x = 3, .ofs_y = -1},
{.bitmap_index = 577, .adv_w = 192, .box_w = 6, .box_h = 13, .ofs_x = 3, .ofs_y = -1},
{.bitmap_index = 616, .adv_w = 192, .box_w = 6, .box_h = 13, .ofs_x = 3, .ofs_y = -1},
{.bitmap_index = 655, .adv_w = 192, .box_w = 11, .box_h = 13, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 727, .adv_w = 192, .box_w = 12, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 799, .adv_w = 192, .box_w = 6, .box_h = 12, .ofs_x = 3, .ofs_y = 0},
{.bitmap_index = 835, .adv_w = 192, .box_w = 6, .box_h = 4, .ofs_x = 3, .ofs_y = 2},
{.bitmap_index = 847, .adv_w = 192, .box_w = 10, .box_h = 6, .ofs_x = 1, .ofs_y = 2},
{.bitmap_index = 877, .adv_w = 192, .box_w = 12, .box_h = 10, .ofs_x = 0, .ofs_y = 1},
{.bitmap_index = 937, .adv_w = 192, .box_w = 12, .box_h = 8, .ofs_x = 0, .ofs_y = 2},
{.bitmap_index = 985, .adv_w = 192, .box_w = 10, .box_h = 12, .ofs_x = 1, .ofs_y = 0}
};
/*---------------------
* CHARACTER MAPPING
*--------------------*/
static const uint16_t unicode_list_0[] = {
0x0, 0x1, 0x2, 0x3, 0x186, 0x187, 0x188, 0x30e,
0x372, 0x37a, 0x448, 0x449, 0x44a, 0x44b, 0x44c, 0x44d,
0x494, 0x495, 0x496, 0x497, 0x671
};
/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] =
{
{
.range_start = 61829, .range_length = 1650, .glyph_id_start = 1,
.unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 21, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
}
};
/*--------------------
* ALL CUSTOM DATA
*--------------------*/
#if LVGL_VERSION_MAJOR == 8
/*Store all the custom data of the font*/
static lv_font_fmt_txt_glyph_cache_t cache;
#endif
#if LVGL_VERSION_MAJOR >= 8
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
.glyph_bitmap = glyph_bitmap,
.glyph_dsc = glyph_dsc,
.cmaps = cmaps,
.kern_dsc = NULL,
.kern_scale = 0,
.cmap_num = 1,
.bpp = 4,
.kern_classes = 0,
.bitmap_format = 0,
#if LVGL_VERSION_MAJOR == 8
.cache = &cache
#endif
};
/*-----------------
* PUBLIC FONT
*----------------*/
/*Initialize a public general font descriptor*/
#if LVGL_VERSION_MAJOR >= 8
const lv_font_t Bootstrap_Icons_12 = {
#else
lv_font_t Bootstrap_Icons_12 = {
#endif
.get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
.get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
.line_height = 14, /*The maximum line height required by the font*/
.base_line = 1, /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
.subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8
.underline_position = 0,
.underline_thickness = 0,
#endif
.dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
#if LV_VERSION_CHECK(8, 2, 0) || LVGL_VERSION_MAJOR >= 9
.fallback = NULL,
#endif
.user_data = NULL,
};
#endif /*#if BOOTSTRAP_ICONS_12*/
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+219 -90
View File
@@ -1,4 +1,6 @@
#include "actions.h"
#include "settings.h"
#include "tahoma.h"
#include <Arduino.h>
bool arc_pressed = false;
@@ -7,42 +9,35 @@ bool animating = false;
float curr_temp = 0.0;
int32_t scale_max = 0, scale_min = 0, lastSelChartValue = 0;
lv_point_t lastChartPt;
Tahoma tahoma;
void update_sensorNstatus(float temp, float hum, float seaLevelPress,
bool presAlarm) {
void update_sensor(float temp, float hum, float seaLevelPress, bool presAlarm) {
glblData.temp = temp;
glblData.hum = hum;
glblData.seaLevelPress = seaLevelPress;
glblData.presAlarm = presAlarm;
update_status();
}
void update_clockdots(void) {
if (ui_getCurrentScreen() != objects.mainScr) {
return;
}
static bool dotState = false;
dotState = !dotState;
char *time = lv_label_get_text(objects.time_txt);
if (dotState) {
time[3] = ':';
lv_label_set_text(objects.time_txt, time);
} else {
time[3] = ' ';
lv_label_set_text(objects.time_txt, time);
}
}
void ui_settemp(float tmp) {
if (ui_getCurrentScreen() != objects.mainScr) {
if (objects.mainScr == NULL) {
return;
}
lv_arc_set_value(objects.temp_arc, (int32_t)(tmp));
}
void update_status(void) {
static bool dotState = false;
static unsigned long fullOnTime = millis();
if (glblData.enBuff) {
lv_obj_remove_flag(objects.bufferIcn, LV_OBJ_FLAG_HIDDEN);
} else {
lv_obj_add_flag(objects.bufferIcn, LV_OBJ_FLAG_HIDDEN);
}
switch (glblData.override) {
case OVR_NONE:
lv_obj_set_style_text_color(objects.bufferIcn, lv_color_hex(0xFFfafafa),
LV_STATE_DEFAULT);
if (glblData.temp < glblData.settemp - TMP_HYST) {
glblData.heating = true;
} else if (glblData.temp > glblData.settemp + TMP_HYST) {
@@ -50,6 +45,8 @@ void update_status(void) {
}
break;
case OVR_ALWAYSON:
lv_obj_set_style_text_color(objects.bufferIcn, lv_color_hex(0xFF00AA00),
LV_STATE_DEFAULT);
if (glblData.temp < glblData.settemp + 3.0) { // allow for 3degC overheating
glblData.heating = true;
} else {
@@ -57,6 +54,8 @@ void update_status(void) {
}
break;
case OVR_ALWAYSOFF:
lv_obj_set_style_text_color(objects.bufferIcn, lv_color_hex(0xFFAA0000),
LV_STATE_DEFAULT);
if (glblData.temp < 12) { // ensure minimum of 12°C
glblData.heating = true;
} else {
@@ -74,23 +73,36 @@ void update_status(void) {
// 50% if powersave mode is enabled
ledcWrite(PWM_REL, 0x7f); // lower relay to 50%
}
if (ledcRead(PWM_REL) < 0xff) { // relay in power save mode
lv_obj_set_style_text_color(objects.heaterIcn, lv_color_hex(0xFF00AA00),
LV_STATE_DEFAULT);
} else { // relay full on
lv_obj_set_style_text_color(objects.heaterIcn, lv_color_hex(0xFFAA0000),
LV_STATE_DEFAULT);
}
lv_obj_remove_flag(objects.heaterIcn, LV_OBJ_FLAG_HIDDEN);
} else {
ledcWrite(PWM_REL, 0); // turn off relay
ledcWrite(PWM_REL, 0); // relay off
lv_obj_add_flag(objects.heaterIcn, LV_OBJ_FLAG_HIDDEN);
}
if (ui_getCurrentScreen() != objects.mainScr) {
if (objects.mainScr == NULL) {
return;
}
dotState = !dotState;
tm timeinfo;
getLocalTime(&timeinfo);
char buffer[15];
strftime(buffer, sizeof(buffer), "%H : %M", &timeinfo);
if (dotState) {
strftime(buffer, sizeof(buffer), "%H : %M", &timeinfo);
} else {
strftime(buffer, sizeof(buffer), "%H %M", &timeinfo);
}
lv_label_set_text_fmt(objects.press_txt, "%4.2f hPa", glblData.seaLevelPress);
lv_label_set_text_fmt(objects.hum_txt, "%2.0f %%rH", glblData.hum);
lv_label_set_text_fmt(objects.outTemp_txt, ICON_THERMOMETER_SNOW "%2.1f °C",
lv_label_set_text_fmt(objects.outTemp_txt, SYM_NATURE " %2.1f °C",
glblData.outTemp);
lv_label_set_text(objects.time_txt, buffer);
if (!arc_pressed && !animating) {
@@ -99,77 +111,43 @@ void update_status(void) {
glblData.settemp = lv_arc_get_value(objects.temp_arc);
lv_label_set_text_fmt(objects.temp_txt, "%2.1f °C", glblData.settemp);
}
if (glblData.enBuff) {
lv_obj_remove_flag(objects.bufferIcn, LV_OBJ_FLAG_HIDDEN);
} else {
lv_obj_add_flag(objects.bufferIcn, LV_OBJ_FLAG_HIDDEN);
}
switch (glblData.override) {
case OVR_NONE:
lv_obj_set_style_text_color(objects.bufferIcn, lv_color_hex(0xFFfafafa),
LV_STATE_DEFAULT);
break;
case OVR_ALWAYSON:
lv_obj_set_style_text_color(objects.bufferIcn, lv_color_hex(0xFF00AA00),
LV_STATE_DEFAULT);
break;
case OVR_ALWAYSOFF:
lv_obj_set_style_text_color(objects.bufferIcn, lv_color_hex(0xFFAA0000),
LV_STATE_DEFAULT);
break;
}
if (glblData.heating) {
if (ledcRead(PWM_REL) < 0xff) { //relay in power save mode
lv_obj_set_style_text_color(objects.heaterIcn, lv_color_hex(0xFF00AA00),
LV_STATE_DEFAULT);
} else{ //relay full on
lv_obj_set_style_text_color(objects.heaterIcn, lv_color_hex(0xFFAA0000),
LV_STATE_DEFAULT);
}
lv_obj_remove_flag(objects.heaterIcn, LV_OBJ_FLAG_HIDDEN);
} else {
ledcWrite(PWM_REL, 0); //relay off
lv_obj_add_flag(objects.heaterIcn, LV_OBJ_FLAG_HIDDEN);
}
}
void update_wifi_strength(wifistrength_t strength, wifimode_t mode) {
if (ui_getCurrentScreen() != objects.mainScr) {
return;
if (mode != WIFIMODE_STA) {
Serial.println("WiFi mode not STA, not updating icon");
lv_obj_set_style_text_color(objects.wifiIcn, lv_color_hex(0xFF0000EE),
LV_STATE_DEFAULT);
} else {
Serial.println("WiFi mode STA, updating icon");
lv_obj_set_style_text_color(objects.wifiIcn, lv_color_hex(0xf0f0f0),
LV_STATE_DEFAULT);
}
if (ui_getCurrentScreen() == objects.mainScr) {
if (mode != WIFIMODE_STA) {
Serial.println("WiFi mode not STA, not updating icon");
lv_obj_set_style_text_color(objects.wifiIcn, lv_color_hex(0xFF0000EE),
LV_STATE_DEFAULT);
} else {
Serial.println("WiFi mode STA, updating icon");
lv_obj_set_style_text_color(objects.wifiIcn, lv_color_hex(0xf0f0f0),
LV_STATE_DEFAULT);
}
switch (strength) {
case WIFISTRENGTH_HIGH:
lv_label_set_text(objects.wifiIcn, ICON_WIFI_HIGH);
break;
case WIFISTRENGTH_MED:
lv_label_set_text(objects.wifiIcn, ICON_WIFI_MED);
break;
case WIFISTRENGTH_LOW:
lv_label_set_text(objects.wifiIcn, ICON_WIFI_LOW);
break;
case WIFISTRENGTH_OFF:
lv_label_set_text(objects.wifiIcn, ICON_WIFI_OFF);
break;
case WIFISTRENGTH_ERROR:
lv_obj_set_style_text_color(objects.wifiIcn, lv_color_hex(0xFF0000),
LV_STATE_DEFAULT);
lv_label_set_text(objects.wifiIcn, ICON_WIFI_OFF);
break;
}
switch (strength) {
case WIFISTRENGTH_HIGH:
lv_label_set_text(objects.wifiIcn, SYM_WIFI_HIGH);
break;
case WIFISTRENGTH_MED:
lv_label_set_text(objects.wifiIcn, SYM_WIFI_MED);
break;
case WIFISTRENGTH_LOW:
lv_label_set_text(objects.wifiIcn, SYM_WIFI_LOW);
break;
case WIFISTRENGTH_OFF:
lv_label_set_text(objects.wifiIcn, SYM_WIFI_OFF);
break;
case WIFISTRENGTH_ERROR:
lv_obj_set_style_text_color(objects.wifiIcn, lv_color_hex(0xFF0000),
LV_STATE_DEFAULT);
lv_label_set_text(objects.wifiIcn, SYM_WIFI_OFF);
break;
}
}
void chartDrawingCB(lv_event_t *e) {
if (objects.chartScr == NULL) {
return;
}
lv_event_code_t code = lv_event_get_code(e);
lv_obj_t *chart = lv_event_get_target_obj(e);
@@ -268,7 +246,7 @@ void chartDrawingCB(lv_event_t *e) {
}
void chart_autoscale(void) {
if (ui_getCurrentScreen() != objects.chartScr) {
if (objects.chartScr == NULL) {
return;
}
int32_t *numbers = lv_chart_get_y_array(objects.chart, objects.chart_series);
@@ -324,6 +302,51 @@ void chart_autoscale(void) {
lv_chart_refresh(objects.chart);
}
void moveRolloDown(lv_event_t *e) {
if (ui_getCurrentScreen() != objects.rolloScr)
return;
;
uint16_t sel = lv_dropdown_get_selected(objects.deviceDropdown);
if (sel == tahoma.numDevs) {
// all selected
for (uint8_t i = 0; i < tahoma.numDevs; i++) {
tahoma.sendMove(i, 100, 100);
}
} else {
tahoma.sendMove(sel, 100, 100);
}
}
void moveRolloMan(lv_event_t *e) {
if (ui_getCurrentScreen() != objects.rolloPosScr)
return;
;
uint8_t sel = tahoma.getCurrentDev();
if (sel == tahoma.numDevs) {
// all selected
for (uint8_t i = 0; i < tahoma.numDevs; i++) {
tahoma.sendMove(i, lv_slider_get_value(objects.rolloPos), lv_arc_get_value(objects.rolloRot)/9);
}
} else {
tahoma.sendMove(sel, lv_slider_get_value(objects.rolloPos), lv_arc_get_value(objects.rolloRot)/9);
}
}
void moveRolloUp(lv_event_t *e) {
if (ui_getCurrentScreen() != objects.rolloScr)
return;
;
uint16_t sel = lv_dropdown_get_selected(objects.deviceDropdown);
if (sel == tahoma.numDevs) {
// all selected
for (uint8_t i = 0; i < tahoma.numDevs; i++) {
tahoma.sendMove(i, 0, 0);
}
} else {
tahoma.sendMove(sel, 0, 0);
}
}
void zoomAniWrapper(void *var, int32_t val) {
lv_obj_t *obj = (lv_obj_t *)var;
int32_t x = -(lv_obj_get_width(obj) * val) / (6 * 255);
@@ -336,6 +359,7 @@ void zoomAniWrapper(void *var, int32_t val) {
lv_obj_set_style_text_opa(objects.time_txt, 255 - val, 0);
}
void zomFinishedCB(lv_anim_t *var) {
if (arc_pressed) {
arc_pressed = false;
animating = false;
@@ -423,26 +447,106 @@ void action_switch_screens(lv_event_t *e) {
void showChartScreen(lv_event_t *e) {
if (ui_getCurrentScreen() != objects.chartScr) {
create_screen_chart();
loadChart(0);
loadChart(ui_getCurrentChart());
update_status();
update_wifi_strength(glblData.wifiStrength, glblData.wifiMode);
}
objects.debugScr = NULL;
objects.mainScr = NULL;
objects.rolloScr = NULL;
objects.menuScr = NULL;
objects.rolloPosScr = NULL;
loadScreen(objects.chartScr);
}
void showMenuScreen(lv_event_t *e) {
if (ui_getCurrentScreen() != objects.menuScr) {
create_screen_menu();
update_status();
update_wifi_strength(glblData.wifiStrength, glblData.wifiMode);
}
objects.debugScr = NULL;
objects.mainScr = NULL;
objects.rolloScr = NULL;
objects.chartScr = NULL;
objects.rolloPosScr = NULL;
loadScreen(objects.menuScr);
}
void showRolloScreen(lv_event_t *e) {
if (ui_getCurrentScreen() != objects.rolloScr) {
create_screen_rollos();
update_status();
update_wifi_strength(glblData.wifiStrength, glblData.wifiMode);
}
for (uint8_t i = 0; i < tahoma.getMyDevices(); i++) {
lv_dropdown_add_option(objects.deviceDropdown,
tahoma.devicelist[i].name.c_str(),
LV_DROPDOWN_POS_LAST);
};
lv_dropdown_add_option(objects.deviceDropdown, "Alle", LV_DROPDOWN_POS_LAST);
objects.debugScr = NULL;
objects.mainScr = NULL;
objects.chartScr = NULL;
objects.menuScr = NULL;
objects.rolloPosScr = NULL;
loadScreen(objects.rolloScr);
}
void showRolloPosScreen(lv_event_t *e) {
if (ui_getCurrentScreen() != objects.rolloPosScr) {
create_screen_rolloPos();
update_status();
update_wifi_strength(glblData.wifiStrength, glblData.wifiMode);
lv_label_set_text_fmt(
objects.debugTxt, "\"%s\"\nmanuell positionieren",
tahoma.devicelist[tahoma.getCurrentDev()].name.c_str());
Tahoma::rolloCommand_t pos = tahoma.getPos();
lv_slider_set_value(objects.rolloPos, pos.position, LV_ANIM_OFF);
lv_arc_set_value(objects.rolloRot, pos.rotation * 9);
}
objects.debugScr = NULL;
objects.mainScr = NULL;
objects.chartScr = NULL;
objects.menuScr = NULL;
objects.rolloScr = NULL;
loadScreen(objects.rolloPosScr);
}
void showDebugScreen(lv_event_t *e) {
if (ui_getCurrentScreen() != objects.debugScr) {
create_screen_debug();
update_status();
update_wifi_strength(glblData.wifiStrength, glblData.wifiMode);
lv_label_set_text_fmt(
objects.debugTxt,
"IP:\n %s\n\nHostname:\n %s\n\nMqtt-Server:\n %s\n\nMqtt-Port:\n "
"%d\n\nMqtt-Topic:\n %s\n\nHeatBuffer:\n %d",
glblData.myIP, Settings::prefs.hostname, Settings::prefs.mqtt_server,
Settings::prefs.mqtt_port, Settings::prefs.mqtt_topic, glblData.enBuff);
}
objects.chartScr = NULL;
objects.mainScr = NULL;
objects.rolloScr = NULL;
objects.menuScr = NULL;
objects.rolloPosScr = NULL;
loadScreen(objects.debugScr);
}
void rebootESP(lv_event_t *e) { ESP.restart(); }
void showMainScreen(lv_event_t *e) {
if (ui_getCurrentScreen() != objects.mainScr) {
create_screen_main();
update_status();
update_wifi_strength(glblData.wifiStrength, glblData.wifiMode);
ui_settemp(glblData.settemp);
}
objects.chartScr = NULL;
objects.debugScr = NULL;
objects.rolloScr = NULL;
objects.menuScr = NULL;
objects.rolloPosScr = NULL;
loadScreen(objects.mainScr);
Serial.println("Main screen loaded");
}
@@ -457,6 +561,31 @@ void action_show_cursors_cb(lv_event_t *e) {
}
}
void checkTahomaActions(void) { tahoma.loop(); }
void rotation_changed_cb(lv_event_t *e) {
lv_obj_t *arc = lv_event_get_target_obj(e);
for (uint8_t i = 0; i < 9; i++) {
lv_obj_set_style_transform_rotation(objects.lam[i],
900 - lv_arc_get_value(arc), 0);
}
}
void rolloChanged(lv_event_t *e) {
tahoma.setCurrentDev(lv_dropdown_get_selected(lv_event_get_target_obj(e)));
}
void pos_changed_cb(lv_event_t *e) {
lv_obj_t *slide = lv_event_get_target_obj(e);
uint8_t numLam = lv_slider_get_value(slide) / 11;
for (uint8_t i = 0; i < 9; i++) {
if (i < numLam)
lv_obj_remove_flag(objects.lam[i], LV_OBJ_FLAG_HIDDEN);
else
lv_obj_add_flag(objects.lam[i], LV_OBJ_FLAG_HIDDEN);
}
}
void draw_event_cb(lv_event_t *e) {
lv_obj_t *obj = (lv_obj_t *)lv_event_get_target(e);
lv_draw_task_t *draw_task = lv_event_get_draw_task(e);
+11 -1
View File
@@ -16,16 +16,26 @@ void action_switch_screens(lv_event_t * e);
void showDebugScreen(lv_event_t * e);
void showChartScreen(lv_event_t * e);
void showMainScreen(lv_event_t * e);
void showMenuScreen(lv_event_t *e);
void showRolloScreen(lv_event_t *e);
void showRolloPosScreen(lv_event_t *e);
void rebootESP(lv_event_t * e);
void action_show_cursors_cb(lv_event_t * e);
void chartDrawingCB(lv_event_t * e);
void update_sensorNstatus(float temp, float hum, float seaLevelPress, bool presAlarm);
void update_sensor(float temp, float hum, float seaLevelPress, bool presAlarm);
void update_clockdots(void);
void update_status(void);
void update_wifi_strength(wifistrength_t strength, wifimode_t mode);
void chart_autoscale(void);
extern dataset_t glblData;
void draw_event_cb(lv_event_t* e);
void moveRolloDown(lv_event_t* e);
void moveRolloUp(lv_event_t* e);
void moveRolloMan(lv_event_t *e);
void checkTahomaActions(void);
void rotation_changed_cb(lv_event_t* e);
void pos_changed_cb(lv_event_t *e);
void rolloChanged(lv_event_t *e);
#ifdef __cplusplus
File diff suppressed because it is too large Load Diff
+11
View File
@@ -11,6 +11,9 @@ typedef struct _objects_t {
lv_obj_t *mainScr;
lv_obj_t *chartScr;
lv_obj_t *debugScr;
lv_obj_t *rolloScr;
lv_obj_t *rolloPosScr;
lv_obj_t *menuScr;
lv_obj_t *temp_arc;
lv_obj_t *temp_txt;
lv_obj_t *hum_txt;
@@ -28,8 +31,12 @@ typedef struct _objects_t {
lv_obj_t *wifiIcn;
lv_obj_t *outTemp_txt;
lv_obj_t *time_txt;
lv_obj_t *deviceDropdown;
lv_obj_t *lam[9];
lv_chart_cursor_t *chart_cursor;
lv_chart_series_t *chart_series;
lv_obj_t *rolloPos;
lv_obj_t *rolloRot;
} objects_t;
extern objects_t objects;
@@ -49,9 +56,13 @@ typedef enum ChartsEnum {
CHART_ID_LEN
}ChartsEnum;
void addStatusIcons(lv_obj_t *parent_obj);
void create_screen_main();
void create_screen_chart();
void create_screen_debug();
void create_screen_menu();
void create_screen_rollos();
void create_screen_rolloPos();
void create_screens();
+45 -16
View File
@@ -66,23 +66,52 @@ void remove_style_arc(lv_obj_t *obj) {
lv_obj_remove_style(obj, get_style_arc_KNOB_DEFAULT(), LV_PART_KNOB | LV_STATE_DEFAULT);
};
//
// Style: slider
//
void init_style_slider_MAIN_DEFAULT(lv_style_t *style) {
lv_style_set_bg_color(style, lv_color_hex(0xff2f3237));
lv_style_set_bg_opa(style, 255);
};
lv_style_t *get_style_slider_MAIN_DEFAULT() {
static lv_style_t *style;
if (!style) {
style = lv_malloc(sizeof(lv_style_t));
lv_style_init(style);
init_style_slider_MAIN_DEFAULT(style);
}
return style;
};
void init_style_slider_INDICATOR_DEFAULT(lv_style_t *style) {
lv_style_set_bg_color(style, lv_color_hex(0xff56f321));
lv_style_set_shadow_width(style, 10);
lv_style_set_shadow_color(style, lv_color_hex(0xff56f321));
};
lv_style_t *get_style_slider_INDICATOR_DEFAULT() {
static lv_style_t *style;
if (!style) {
style = lv_malloc(sizeof(lv_style_t));
lv_style_init(style);
init_style_slider_INDICATOR_DEFAULT(style);
}
return style;
};
void add_style_slider(lv_obj_t *obj) {
lv_obj_add_style(obj, get_style_slider_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_add_style(obj, get_style_slider_INDICATOR_DEFAULT(), LV_PART_INDICATOR | LV_STATE_DEFAULT);
};
void remove_style_slider(lv_obj_t *obj) {
lv_obj_remove_style(obj, get_style_slider_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_remove_style(obj, get_style_slider_INDICATOR_DEFAULT(), LV_PART_INDICATOR | LV_STATE_DEFAULT);
};
//
//
//
void add_style(lv_obj_t *obj, int32_t styleIndex) {
typedef void (*AddStyleFunc)(lv_obj_t *obj);
static const AddStyleFunc add_style_funcs[] = {
add_style_arc,
};
add_style_funcs[styleIndex](obj);
}
void remove_style(lv_obj_t *obj, int32_t styleIndex) {
typedef void (*RemoveStyleFunc)(lv_obj_t *obj);
static const RemoveStyleFunc remove_style_funcs[] = {
remove_style_arc,
};
remove_style_funcs[styleIndex](obj);
}
+2
View File
@@ -13,6 +13,8 @@ lv_style_t *get_style_arc_INDICATOR_DEFAULT();
lv_style_t *get_style_arc_KNOB_DEFAULT();
void add_style_arc(lv_obj_t *obj);
void remove_style_arc(lv_obj_t *obj);
void add_style_slider(lv_obj_t *obj);
void remove_style_slider(lv_obj_t *obj);
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,715 @@
/*******************************************************************************
* Size: 34 px
* Bpp: 2
* Opts: --no-compress --no-prefilter --bpp 2 --size 34 --font C:\Users\m0\Desktop\LVGL_FontGen\bootstrap_jalousie(0xF100).ttf -r 62925,61696,61719,62450,61993,62005,62501,62435,61939 --font C:\Users\m0\Desktop\LVGL_FontGen\MaterialSymbolsRounded[FILL,GRAD,opsz,wght]-wght100-slnt4-opts0.ttf -r 57990,57410 --font F:\m0\Git-Projekte\Raumtempregler\LVGL_FontGen\Montserrat-Medium.ttf -r 0x20 --symbols 0123456789,.-°C --format lvgl -o C:\Users\m0\Desktop\LVGL_FontGen\symbol_font_34.c --force-fast-kern-format
******************************************************************************/
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif
#ifndef SYMBOL_FONT_34
#define SYMBOL_FONT_34 1
#endif
#if SYMBOL_FONT_34
/*-----------------
* BITMAPS
*----------------*/
/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
/* U+0020 " " */
/* U+002C "," */
0x5, 0x3, 0xf8, 0x7f, 0xc7, 0xfc, 0x2f, 0xc0,
0xf4, 0x1f, 0x2, 0xf0, 0x3d, 0x3, 0xc0,
/* U+002D "-" */
0x3f, 0xff, 0xf0, 0xff, 0xff, 0xc3, 0xff, 0xff,
0x0,
/* U+002E "." */
0x9, 0x3, 0xfc, 0x7f, 0xc3, 0xfc, 0x1f, 0x40,
/* U+0030 "0" */
0x0, 0x2, 0xff, 0x90, 0x0, 0x0, 0xb, 0xff,
0xff, 0x40, 0x0, 0xf, 0xff, 0xff, 0xf8, 0x0,
0xf, 0xfd, 0x1, 0xff, 0x80, 0xb, 0xf8, 0x0,
0xf, 0xf0, 0x3, 0xf8, 0x0, 0x0, 0xfe, 0x1,
0xfc, 0x0, 0x0, 0x1f, 0xc0, 0xfe, 0x0, 0x0,
0x3, 0xf4, 0x3f, 0x40, 0x0, 0x0, 0xbe, 0xf,
0xc0, 0x0, 0x0, 0x2f, 0xc7, 0xf0, 0x0, 0x0,
0x7, 0xf1, 0xfc, 0x0, 0x0, 0x1, 0xfc, 0x7f,
0x0, 0x0, 0x0, 0x7f, 0x1f, 0xc0, 0x0, 0x0,
0x1f, 0xc3, 0xf0, 0x0, 0x0, 0xb, 0xf0, 0xfd,
0x0, 0x0, 0x2, 0xf8, 0x3f, 0x80, 0x0, 0x0,
0xfd, 0x7, 0xf0, 0x0, 0x0, 0x7f, 0x0, 0xfe,
0x0, 0x0, 0x3f, 0x80, 0x2f, 0xe0, 0x0, 0x3f,
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c_t glyph_dsc[] = {
{.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
{.bitmap_index = 0, .adv_w = 146, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 0, .adv_w = 123, .box_w = 6, .box_h = 10, .ofs_x = 1, .ofs_y = -5},
{.bitmap_index = 15, .adv_w = 208, .box_w = 11, .box_h = 3, .ofs_x = 1, .ofs_y = 8},
{.bitmap_index = 24, .adv_w = 123, .box_w = 6, .box_h = 5, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 32, .adv_w = 363, .box_w = 21, .box_h = 24, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 158, .adv_w = 201, .box_w = 10, .box_h = 24, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 218, .adv_w = 312, .box_w = 19, .box_h = 24, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 332, .adv_w = 311, .box_w = 18, .box_h = 24, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 440, .adv_w = 364, .box_w = 22, .box_h = 24, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 572, .adv_w = 312, .box_w = 19, .box_h = 24, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 686, .adv_w = 336, .box_w = 20, .box_h = 24, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 806, .adv_w = 325, .box_w = 18, .box_h = 24, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 914, .adv_w = 350, .box_w = 20, .box_h = 24, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 1034, .adv_w = 336, .box_w = 20, .box_h = 24, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 1154, .adv_w = 393, .box_w = 23, .box_h = 24, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 1292, .adv_w = 228, .box_w = 12, .box_h = 11, .ofs_x = 1, .ofs_y = 13},
{.bitmap_index = 1325, .adv_w = 544, .box_w = 22, .box_h = 26, .ofs_x = 6, .ofs_y = 4},
{.bitmap_index = 1468, .adv_w = 544, .box_w = 26, .box_h = 22, .ofs_x = 4, .ofs_y = 6},
{.bitmap_index = 1611, .adv_w = 544, .box_w = 32, .box_h = 31, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 1859, .adv_w = 544, .box_w = 28, .box_h = 30, .ofs_x = 3, .ofs_y = 4},
{.bitmap_index = 2069, .adv_w = 544, .box_w = 34, .box_h = 35, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 2367, .adv_w = 544, .box_w = 26, .box_h = 17, .ofs_x = 4, .ofs_y = 9},
{.bitmap_index = 2478, .adv_w = 544, .box_w = 26, .box_h = 17, .ofs_x = 4, .ofs_y = 8},
{.bitmap_index = 2589, .adv_w = 544, .box_w = 36, .box_h = 36, .ofs_x = -1, .ofs_y = -1},
{.bitmap_index = 2913, .adv_w = 544, .box_w = 34, .box_h = 34, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 3202, .adv_w = 544, .box_w = 33, .box_h = 30, .ofs_x = 0, .ofs_y = 2},
{.bitmap_index = 3450, .adv_w = 544, .box_w = 16, .box_h = 35, .ofs_x = 9, .ofs_y = -1}
};
/*---------------------
* CHARACTER MAPPING
*--------------------*/
static const uint16_t unicode_list_0[] = {
0x0, 0xc, 0xd, 0xe, 0x10, 0x11, 0x12, 0x13,
0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x23, 0x90,
0xe022, 0xe266, 0xf0e0, 0xf0f7, 0xf1d3, 0xf209, 0xf215, 0xf3c3,
0xf3d2, 0xf405, 0xf5ad
};
/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] =
{
{
.range_start = 32, .range_length = 62894, .glyph_id_start = 1,
.unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 27, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
}
};
/*-----------------
* KERNING
*----------------*/
/*Map glyph_ids to kern left classes*/
static const uint8_t kern_left_class_mapping[] =
{
0, 0, 1, 2, 1, 3, 0, 4,
5, 6, 7, 8, 9, 10, 3, 11,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0
};
/*Map glyph_ids to kern right classes*/
static const uint8_t kern_right_class_mapping[] =
{
0, 0, 1, 2, 1, 3, 4, 5,
6, 7, 8, 3, 9, 10, 11, 12,
13, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0
};
/*Kern values between classes*/
static const int8_t kern_class_values[] =
{
0, -4, -7, -7, 5, 5, -5, 0,
-7, 5, 0, 0, -34, -4, 2, 4,
-10, -7, -11, 4, 0, -5, 0, 0,
0, 0, -7, 4, 0, -2, -2, -5,
0, 0, -4, 0, 0, 0, 2, 5,
-4, -2, 0, 0, 0, -10, 0, -2,
0, 0, 0, 0, 0, 0, 0, 0,
-3, -3, 0, -5, -7, 0, 0, 0,
-8, 11, 5, 0, -14, -2, -7, 0,
-2, -26, 5, -4, 5, -16, 0, 0,
0, 0, -3, -3, 0, -3, -7, 0,
0, 0, -7, 5, 3, 0, 0, 0,
0, 0, 0, -4, 0, 0, 0, -10,
-28, -27, -11, 5, 0, -4, -35, -10,
0, -10, 0, -10, 3, 5, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 7, -2, -12, 5, -4, -2,
-14, -5, 0, -7, -5, -8, 5, -34,
0, 2, 23, 16, 9, -22, 4, 23,
0, 20, 0, 0
};
/*Collect the kern class' data in one place*/
static const lv_font_fmt_txt_kern_classes_t kern_classes =
{
.class_pair_values = kern_class_values,
.left_class_mapping = kern_left_class_mapping,
.right_class_mapping = kern_right_class_mapping,
.left_class_cnt = 12,
.right_class_cnt = 13,
};
/*--------------------
* ALL CUSTOM DATA
*--------------------*/
#if LVGL_VERSION_MAJOR == 8
/*Store all the custom data of the font*/
static lv_font_fmt_txt_glyph_cache_t cache;
#endif
#if LVGL_VERSION_MAJOR >= 8
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
.glyph_bitmap = glyph_bitmap,
.glyph_dsc = glyph_dsc,
.cmaps = cmaps,
.kern_dsc = &kern_classes,
.kern_scale = 16,
.cmap_num = 1,
.bpp = 2,
.kern_classes = 1,
.bitmap_format = 0,
#if LVGL_VERSION_MAJOR == 8
.cache = &cache
#endif
};
/*-----------------
* PUBLIC FONT
*----------------*/
/*Initialize a public general font descriptor*/
#if LVGL_VERSION_MAJOR >= 8
const lv_font_t symbol_font_34 = {
#else
lv_font_t symbol_font_34 = {
#endif
.get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
.get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
.line_height = 40, /*The maximum line height required by the font*/
.base_line = 5, /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
.subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8
.underline_position = 0,
.underline_thickness = 0,
#endif
.dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
#if LV_VERSION_CHECK(8, 2, 0) || LVGL_VERSION_MAJOR >= 9
.fallback = NULL,
#endif
.user_data = NULL,
};
#endif /*#if SYMBOL_FONT_34*/
+37 -38
View File
@@ -10,8 +10,6 @@
extern "C" {
#endif
LV_FONT_DECLARE(Bootstrap_Icons_16);
LV_FONT_DECLARE(Bootstrap_Icons_18);
//included icons in bootstrap font
//use this list for font generator:
/*
@@ -19,42 +17,43 @@
0xF5CD-0xF5D2,0xF100,0xF479,0xF5D4,0xF5D3,0xF116,0xF117,0xF3F2,0xF229,0xF22C,0xF235,0xF238,0xF22D,0xF230,0xF231,0xF234
*/
#define ICON_WIFI_LOW "\xEF\x98\x99" //F619
#define ICON_WIFI_MED "\xEF\x98\x9A" //F61A
#define ICON_WIFI_HIGH "\xEF\x98\x9C" //F61C
#define ICON_WIFI_OFF "\xEF\x98\x9B" //F61B
#define ICON_FIRE "\xEF\x9F\xB6" //F7F6
#define ICON_POWER "\xEF\x93\xBF" //F4FF
#define ICON_BATT_CHARG "\xEF\x86\x85" //F185
#define ICON_BATT_FULL "\xEF\x86\x86" //F186
#define ICON_BATT_HALF "\xEF\x86\x87" //F187
#define ICON_BATT "\xEF\x86\x88" //F188
#define ICON_DROPLET_FULL "\xEF\x8C\x8B" //F30B
#define ICON_DROPLET_HALF "\xEF\x8C\x8C" //F30C
#define ICON_DROPLET "\xEF\x8C\x8D" //F30D
#define ICON_MOISTURE "\xEF\x92\x93" //F493
#define ICON_PLUG "\xEF\x93\xB7" //F4F7
#define ICON_THERMOMETER_HALF "\xEF\x97\x8D" //F5CD
#define ICON_THERMOMETER_HIGH "\xEF\x97\x8E" //F5CE
#define ICON_THERMOMETER_LOW "\xEF\x97\x8F" //F5CF
#define ICON_THERMOMETER_SNOW "\xEF\x97\x90" //F5D0
#define ICON_THERMOMETER_SUN "\xEF\x97\x91" //F5D1
#define ICON_THERMOMETER "\xEF\x97\x92" //F5D2
#define ICON_SHUTTER "" //F100
#define ICON_MENU_LINES "" //F479
#define ICON_MENU_DOTS_H "" //F5D4
#define ICON_MENU_DOTS_V "" //F5D3
#define ICON_ROTATE_CW "" //F116
#define ICON_ROTATE_CC "" //F117
#define ICON_GRAPH "" //F3F2
#define ICON_ARROW_DOWN_FILL "" //F229
#define ICON_ARROW_DOWN "" //F22C
#define ICON_ARROW_UP_FILL "" //F235
#define ICON_ARROW_UP "" //F238
#define ICON_ARROW_LEFT_FILL "" //F22D
#define ICON_ARROW_LEFT "" //F230
#define ICON_ARROW_RIGHT_FILL "" //F231
#define ICON_ARROW_RIGHT "" //F234
#define SYM_WIFI_LOW "\xEF\x98\x99"
#define SYM_WIFI_MED "\xEF\x98\x9A"
#define SYM_WIFI_HIGH "\xEF\x98\x9C"
#define SYM_WIFI_OFF "\xEF\x98\x9B"
#define SYM_FIRE "\xEF\x9F\xB6"
#define SYM_POWER "\xEF\x93\xBF"
#define SYM_DROPLET_FULL "\xEF\x8C\x8B"
#define SYM_DROPLET_HALF "\xEF\x8C\x8C"
#define SYM_DROPLET "\xEF\x8C\x8D"
#define SYM_THERMOMETER_HALF "\xEF\x97\x8D"
#define SYM_THERMOMETER_SNOW "\xEF\x97\x90"
#define SYM_THERMOMETER_SUN "\xEF\x97\x91"
#define SYM_SHUTTER "\xEF\x84\x80"
#define SYM_ROTATE_CC "\xEF\x84\x97"
#define SYM_GRAPH "\xEF\x8F\xB2"
#define SYM_ARROW_DOWN_FILL "\xEF\x88\xA9"
#define SYM_ARROW_DOWN "\xEF\x88\xAC"
#define SYM_ARROW_UP_FILL "\xEF\x88\xB5"
#define SYM_SUNRISE "\xEF\x96\xA5"
#define SYM_SUNSET "\xEF\x96\xA7"
#define SYM_HOUSE "\xEF\x90\xA5"
#define SYM_CHECK "\xEF\x89\xB2"
#define SYM_X_LG "\xEF\x99\x99"
#define SYM_GEAR_CON "\xEF\x8F\xA3"
#define SYM_CALENDAR_WEEK "\xEF\x87\xB3"
#define SYM_BLINDS "\xEE\x8A\x86"
#define SYM_KEYBOARD_ARROW_DOWN "\xEE\x8C\x93"
#define SYM_KEYBOARD_ARROW_RIGHT "\xEE\x8C\x95"
#define SYM_KEYBOARD_ARROW_UP "\xEE\x8C\x96"
#define SYM_REPLAY "\xEE\x81\x82"
#define SYM_ECO "\xEE\xA8\xB5"
#define SYM_NATURE "\xEE\x90\x86"
#define SYM_NATURE_PEOPLE "\xEE\x90\x87"
/*-------------------------------
+180 -178
View File
@@ -1,19 +1,22 @@
#include <Arduino.h>
#include "ui.h"
#include "screens.h"
#include "images.h"
#include "actions.h"
#include "images.h"
#include "screens.h"
#include "vars.h"
#include <string.h>
#include <Arduino.h>
#include <Arduino_GFX_Library.h>
#include <TouchDrvCSTXXX.hpp>
#include <Ticker.h>
#include <TouchDrvCSTXXX.hpp>
#include <string.h>
Arduino_DataBus *bus = new Arduino_ESP32SPI(3 /* DC */, 5 /* CS */, 2 /* SCK */, 4 /* MOSI */, -1 /* MISO */, FSPI /* spi_num */);
Arduino_GC9A01 *gfx = new Arduino_GC9A01(bus, 0 /* RST */, 2 /* rotation */, true /* IPS */);
Arduino_DataBus *bus =
new Arduino_ESP32SPI(3 /* DC */, 5 /* CS */, 2 /* SCK */, 4 /* MOSI */,
-1 /* MISO */, FSPI /* spi_num */);
Arduino_GC9A01 *gfx =
new Arduino_GC9A01(bus, 0 /* RST */, 2 /* rotation */, true /* IPS */);
TouchDrvCSTXXX touch;
Ticker fadeTicker;
bool isPressed = false,sleeping=false;
bool isPressed = false, sleeping = false;
unsigned long lastTouch;
static lv_obj_t *currentScreen = NULL;
static enum ChartsEnum currentChart = CHART_ID_TEMP;
@@ -25,203 +28,202 @@ static lv_obj_t *getLvglObjectFromIndex(int32_t index) {
return ((lv_obj_t **)&objects)[index];
}
*/
void loadScreen(lv_obj_t* screen) {
lv_scr_load_anim(screen, LV_SCR_LOAD_ANIM_FADE_IN, 200, 0, true);
currentScreen = screen;
void loadScreen(lv_obj_t *screen) {
lv_scr_load_anim(screen, LV_SCR_LOAD_ANIM_FADE_IN, 200, 0, true);
currentScreen = screen;
}
void fadeBrightness(uint16_t _newBrightness) {
uint16_t bright = ledcRead(GFX_BL);
if (_newBrightness > bright) {
bright += 10;
} else if (_newBrightness < bright) {
bright -= 10;
}
ledcWrite(GFX_BL, bright);
if (_newBrightness == bright) {
fadeTicker.detach();
}
}
void setBacklight(uint16_t brightness, uint16_t fadeTime){
if(brightness > BL_BRIGHTNESS)
brightness = BL_BRIGHTNESS;
ledcWrite(GFX_BL,brightness);
/* uint16_t fadeTickTime = fadeTime/(abs(brightness - (uint16_t)ledcRead(GFX_BL))/10);
if(fadeTickTime < 1)
fadeTickTime = 1;
uint16_t bright = ledcRead(GFX_BL);
if (_newBrightness > bright) {
bright += 10;
} else if (_newBrightness < bright) {
bright -= 10;
}
ledcWrite(GFX_BL, bright);
if (_newBrightness == bright) {
fadeTicker.detach();
fadeTicker.attach_ms(fadeTickTime, fadeBrightness,brightness);*/
}
}
void DisplayInit(void){
ledcAttachPin(GFX_BL, GFX_BL);
ledcSetup(GFX_BL, 2000, 10);
ledcWrite(GFX_BL, 0);
gfx->begin(80000000);
gfx->fillScreen(0x0000);
void setBacklight(uint16_t brightness, uint16_t fadeTime) {
if (brightness > BL_BRIGHTNESS)
brightness = BL_BRIGHTNESS;
ledcWrite(GFX_BL, brightness);
/* uint16_t fadeTickTime = fadeTime/(abs(brightness -
(uint16_t)ledcRead(GFX_BL))/10); if(fadeTickTime < 1) fadeTickTime = 1;
fadeTicker.detach();
fadeTicker.attach_ms(fadeTickTime, fadeBrightness,brightness);*/
}
void loadChart(uint8_t chartId){
if(chartId < 1 || chartId >= CHART_ID_LEN)
return;
switch(chartId){
case CHART_ID_TEMP:
lv_label_set_text(objects.chart_header,"Temperature");
lv_chart_set_ext_y_array(objects.chart,objects.chart_series,history_getTempPt());
break;
case CHART_ID_HUM:
lv_label_set_text(objects.chart_header,"Humidity");
lv_chart_set_ext_y_array(objects.chart,objects.chart_series,history_getHumPt());
break;
case CHART_ID_PRESS:
lv_label_set_text(objects.chart_header,"Pressure");
lv_chart_set_ext_y_array(objects.chart,objects.chart_series,history_getPressPt());
break;
}
currentChart = (enum ChartsEnum) chartId;
chart_autoscale();
void DisplayInit(void) {
ledcAttachPin(GFX_BL, GFX_BL);
ledcSetup(GFX_BL, 2000, 10);
ledcWrite(GFX_BL, 0);
gfx->begin(80000000);
gfx->fillScreen(0x0000);
}
lv_obj_t* ui_getCurrentScreen(void){
return currentScreen;
void loadChart(uint8_t chartId) {
if (chartId < 1 || chartId >= CHART_ID_LEN)
return;
switch (chartId) {
case CHART_ID_TEMP:
lv_label_set_text(objects.chart_header, "Temperature");
lv_chart_set_ext_y_array(objects.chart, objects.chart_series,
history_getTempPt());
break;
case CHART_ID_HUM:
lv_label_set_text(objects.chart_header, "Humidity");
lv_chart_set_ext_y_array(objects.chart, objects.chart_series,
history_getHumPt());
break;
case CHART_ID_PRESS:
lv_label_set_text(objects.chart_header, "Pressure");
lv_chart_set_ext_y_array(objects.chart, objects.chart_series,
history_getPressPt());
break;
}
currentChart = (enum ChartsEnum)chartId;
chart_autoscale();
}
ChartsEnum ui_getCurrentChart(void){
return (ChartsEnum) currentChart;
}
lv_obj_t *ui_getCurrentScreen(void) { return currentScreen; }
ChartsEnum ui_getCurrentChart(void) { return (ChartsEnum)currentChart; }
void ui_init() {
lv_disp_t *dispp = lv_disp_get_default();
lv_theme_t *theme = lv_theme_default_init(dispp, lv_palette_main(LV_PALETTE_GREEN), lv_palette_main(LV_PALETTE_RED), true, LV_FONT_DEFAULT);
lv_disp_set_theme(dispp, theme);
create_screen_main();
loadScreen(objects.mainScr);
lv_disp_t *dispp = lv_disp_get_default();
lv_theme_t *theme = lv_theme_default_init(
dispp, lv_palette_main(LV_PALETTE_GREEN), lv_palette_main(LV_PALETTE_RED),
true, LV_FONT_DEFAULT);
lv_disp_set_theme(dispp, theme);
create_screen_main();
loadScreen(objects.mainScr);
}
bool ui_isSleeping(void){
return sleeping;
}
bool ui_isSleeping(void) { return sleeping; }
void ui_exitSleep(){
if(sleeping){
isPressed = true;
}else{
lastTouch = millis();
}
void ui_exitSleep() {
if (sleeping) {
isPressed = true;
} else {
lastTouch = millis();
}
}
void ui_tick() {
if(millis() - lastTouch > SLEEP_TIMEOUT){
if(!sleeping){
displaySleep();
sleeping = true;
}
unsigned long millisbefore = millis();
//while((millis()-millisbefore) < 10000 && (millis() - lastTouch) > SLEEP_TIMEOUT){
delay(200);
if (isPressed){
lastTouch = millis();
}else{
lastTouch = millis()-SLEEP_TIMEOUT-1;
}
//}
}else if(sleeping){
Serial.print("WAKE!!");
lastTouch = millis();
displayWake();
lv_obj_invalidate(objects.temp_arc);
lv_task_handler(); // let the GUI do its work
sleeping= false;
isPressed = false;
if (millis() - lastTouch > SLEEP_TIMEOUT) {
if (!sleeping) {
displaySleep();
sleeping = true;
}
unsigned long millisbefore = millis();
// while((millis()-millisbefore) < 10000 && (millis() - lastTouch) >
// SLEEP_TIMEOUT){
delay(200);
if (isPressed) {
lastTouch = millis();
} else {
lastTouch = millis() - SLEEP_TIMEOUT - 1;
}
//}
} else if (sleeping) {
Serial.print("WAKE!!");
lastTouch = millis();
displayWake();
// lv_obj_invalidate(objects.temp_arc);
lv_task_handler(); // let the GUI do its work
sleeping = false;
isPressed = false;
}
}
void displaySleep(){
gfx->displayOff();
setBacklight(0,300);
void displaySleep() {
gfx->displayOff();
setBacklight(0, 300);
}
void displayWake(){
//Serial.println("wakeup");
gfx->displayOn();
delay(10);
lv_obj_invalidate(objects.temp_arc);
lv_task_handler(); // let the GUI do its work
setBacklight(BL_BRIGHTNESS,200);
void displayWake() {
// Serial.println("wakeup");
gfx->displayOn();
delay(10);
// lv_obj_invalidate(objects.temp_arc);
lv_task_handler(); // let the GUI do its work
setBacklight(BL_BRIGHTNESS, 200);
}
void TouchInit()
{
pinMode(TouchRST, OUTPUT);
digitalWrite(TouchRST, LOW);
delay(30);
digitalWrite(TouchRST, HIGH);
delay(50);
touch.setPins(TouchRST, TouchInt);
Wire.begin(TouchSDA,TouchSCL); //初始化IIC,设置引脚 SCL:22 SDA:21
Wire.setClock(200000); //设置频率400KHZ
if(touch.begin(Wire, TouchI2CAddr, TouchSDA, TouchSCL)){
Serial.println("Touch screen initialization done");
}
attachInterrupt(TouchInt, []() {
isPressed = true;
}, CHANGE);
void TouchInit() {
pinMode(TouchRST, OUTPUT);
digitalWrite(TouchRST, LOW);
delay(30);
digitalWrite(TouchRST, HIGH);
delay(50);
touch.setPins(TouchRST, TouchInt);
Wire.begin(TouchSDA, TouchSCL); //初始化IIC,设置引脚 SCL:22 SDA:21
Wire.setClock(200000); //设置频率400KHZ
if (touch.begin(Wire, TouchI2CAddr, TouchSDA, TouchSCL)) {
Serial.println("Touch screen initialization done");
}
void my_touch_read(lv_indev_t * indev, lv_indev_data_t * data)
{
int16_t x = 0;
int16_t y = 0;
if (isPressed && !sleeping) {
lastTouch = millis();
isPressed = false;
uint8_t touched = touch.getPoint(&x, &y, 1);
if (touched) {
data->point.x = SCREEN_WIDTH - x;
data->point.y = SCREEN_HEIGHT - y;
data->state = LV_INDEV_STATE_PRESSED;
}else {
data->state = LV_INDEV_STATE_RELEASED;
}
}
}
void log_print(lv_log_level_t level, const char * buf) {
LV_UNUSED(level);
Serial.println(buf);
Serial.flush();
attachInterrupt(
TouchInt, []() { isPressed = true; }, CHANGE);
}
void my_flush_cb(lv_display_t * display, const lv_area_t * area, uint8_t * px_map)
{
/* The most simple case (also the slowest) to send all rendered pixels to the
* screen one-by-one. `put_px` is just an example. It needs to be implemented by you. */
uint16_t * buf16 = (uint16_t *)px_map; /* Let's say it's a 16 bit (RGB565) display */
int32_t x, y;
gfx->startWrite();
gfx->writeAddrWindow(area->x1, area->y1, area->x2 - area->x1+1, area->y2 - area->y1+1);
//bus->writeBytes(px_map,(uint32_t) (1+area->y2 - area->y1) * (1+area->x2 - area->x1));
for(y = area->y1; y <= area->y2; y++) {
for(x = area->x1; x <= area->x2; x++) {
void my_touch_read(lv_indev_t *indev, lv_indev_data_t *data) {
int16_t x = 0;
int16_t y = 0;
if (isPressed && !sleeping) {
lastTouch = millis();
isPressed = false;
uint8_t touched = touch.getPoint(&x, &y, 1);
if (touched) {
if (x > 240)
x = 240;
else if (x < 0)
x = 0;
if (y > 240)
y = 240;
else if (y < 0)
y = 0;
data->point.x = SCREEN_WIDTH - x;
data->point.y = SCREEN_HEIGHT - y;
data->state = LV_INDEV_STATE_PRESSED;
} else {
data->state = LV_INDEV_STATE_RELEASED;
}
}
}
void log_print(lv_log_level_t level, const char *buf) {
LV_UNUSED(level);
Serial.println(buf);
Serial.flush();
}
void my_flush_cb(lv_display_t *display, const lv_area_t *area,
uint8_t *px_map) {
/* The most simple case (also the slowest) to send all rendered pixels to the
* screen one-by-one. `put_px` is just an example. It needs to be
* implemented by you. */
uint16_t *buf16 =
(uint16_t *)px_map; /* Let's say it's a 16 bit (RGB565) display */
int32_t x, y;
gfx->startWrite();
gfx->writeAddrWindow(area->x1, area->y1, area->x2 - area->x1 + 1,
area->y2 - area->y1 + 1);
// bus->writeBytes(px_map,(uint32_t) (1+area->y2 - area->y1) * (1+area->x2 -
// area->x1));
for (y = area->y1; y <= area->y2; y++) {
for (x = area->x1; x <= area->x2; x++) {
// //gfx->writePixel(x, y, *buf16);
bus->write16(*buf16);
bus->write16(*buf16);
// bus->write16bitBeRGBBitmapR1()
buf16++;
}
}
gfx->endWrite();
/* IMPORTANT!!!
* Inform LVGL that flushing is complete so buffer can be modified again. */
lv_display_flush_ready(display);
buf16++;
}
}
gfx->endWrite();
/* IMPORTANT!!!
* Inform LVGL that flushing is complete so buffer can be modified again. */
lv_display_flush_ready(display);
}