mirror of https://github.com/arendst/Tasmota.git
Introduced tasmota_options.h for libs
This commit is contained in:
parent
c398ce7364
commit
63c7e5f7bf
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
tasmota_include.h - header to be included in libs for external configuration via Tasmota ifdefs
|
||||
|
||||
Copyright (C) 2021 Theo Arends
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __TASMOTA_INCLUDE__
|
||||
#define __TASMOTA_INCLUDE__
|
||||
|
||||
#include "../tasmota/my_user_config.h"
|
||||
#include "../tasmota/tasmota_configurations.h"
|
||||
|
||||
#endif // __TASMOTA_INCLUDE__
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"name": "Display renderer",
|
||||
"version": "1.0",
|
||||
"description": "ESP8266 ESP32 library for Tasmota displays",
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/arendst/Tasmota",
|
||||
"frameworks": "*",
|
||||
"platforms": "*",
|
||||
"authors":
|
||||
{
|
||||
"name": "Gerhard Mutz",
|
||||
"maintainer": true
|
||||
},
|
||||
"build": {
|
||||
"flags": [ "-I$PROJECT_DIR/include" ]
|
||||
}
|
||||
}
|
|
@ -629,7 +629,7 @@ LVGL_PARAMS *Renderer::lvgl_pars(void) {
|
|||
}
|
||||
|
||||
|
||||
#ifndef LVGL_RENDERER
|
||||
#ifndef USE_DISPLAY_LVGL_ONLY
|
||||
|
||||
void VButton::xdrawButton(bool inverted) {
|
||||
wr_redir=1;
|
||||
|
@ -726,7 +726,7 @@ uint16_t VButton::UpdateSlider(int16_t x, int16_t y) {
|
|||
}
|
||||
|
||||
}
|
||||
#endif // LVGL_RENDERER
|
||||
#endif // USE_DISPLAY_LVGL_ONLY
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include <Adafruit_GFX.h>
|
||||
#include "fonts.h"
|
||||
#include "tasmota_options.h"
|
||||
|
||||
#define BLACK 0
|
||||
#define WHITE 1
|
||||
|
@ -17,9 +18,9 @@
|
|||
|
||||
#define MAX_INDEXCOLORS 32
|
||||
|
||||
//#define LVGL_RENDERER
|
||||
//#define USE_DISPLAY_LVGL_ONLY
|
||||
|
||||
#ifdef LVGL_RENDERER
|
||||
#ifdef USE_DISPLAY_LVGL_ONLY
|
||||
#undef USE_EPD_FONTS
|
||||
#endif
|
||||
|
||||
|
@ -134,7 +135,7 @@ struct Slider {
|
|||
uint16_t barcol;
|
||||
};
|
||||
|
||||
#ifndef LVGL_RENDERER
|
||||
#ifndef USE_DISPLAY_LVGL_ONLY
|
||||
class VButton : public Adafruit_GFX_Button {
|
||||
public:
|
||||
TButton_State vpower;
|
||||
|
@ -145,7 +146,7 @@ class VButton : public Adafruit_GFX_Button {
|
|||
uint16_t UpdateSlider(int16_t x, int16_t y);
|
||||
void SliderInit(Renderer *rend, uint16_t xp, uint16_t yp, uint16_t xs, uint16_t ys, uint16_t nelem, uint16_t bgcol, uint16_t frcol, uint16_t barcol);
|
||||
};
|
||||
#endif // LVGL_RENDERER
|
||||
#endif // USE_DISPLAY_LVGL_ONLY
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"name": "universal display Library",
|
||||
"version": "0.1",
|
||||
"description": "This is a library a couple of displays.",
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/arendst/Tasmota",
|
||||
"frameworks": "*",
|
||||
"platforms": "*",
|
||||
"authors":
|
||||
{
|
||||
"name": "Gerhard Mutz",
|
||||
"maintainer": true
|
||||
},
|
||||
"build": {
|
||||
"flags": [ "-I$PROJECT_DIR/include" ]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"name": "TLS mini client derived from Arduino",
|
||||
"version": "1.0",
|
||||
"description": "TLS mini client derived from Arduino",
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/arendst/Tasmota",
|
||||
"frameworks": "*",
|
||||
"platforms": "*",
|
||||
"authors":
|
||||
{
|
||||
"name": "Stephan Hadinger",
|
||||
"maintainer": true
|
||||
},
|
||||
"build": {
|
||||
"flags": [ "-I$PROJECT_DIR/include" ]
|
||||
}
|
||||
}
|
|
@ -25,8 +25,7 @@
|
|||
Modified 8 May 2015 by Hristo Gochkov (proper post and file upload handling)
|
||||
*/
|
||||
|
||||
#include "my_user_config.h"
|
||||
#include "tasmota_configurations.h"
|
||||
#include "tasmota_options.h"
|
||||
|
||||
#if defined(ESP8266) && defined(USE_TLS)
|
||||
#include <stdint.h>
|
|
@ -20,8 +20,7 @@
|
|||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "my_user_config.h"
|
||||
#include "tasmota_configurations.h"
|
||||
#include "tasmota_options.h"
|
||||
#if defined(USE_TLS)
|
||||
|
||||
// #define DEBUG_TLS
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#if defined(USE_FT5206) || defined(USE_XPT2046) || defined(USE_LILYGO47)
|
||||
|
||||
#ifdef LVGL_RENDERER
|
||||
#ifdef USE_DISPLAY_LVGL_ONLY
|
||||
#undef USE_TOUCH_BUTTONS
|
||||
#endif
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
|
||||
|
||||
#if defined(USE_DISPLAY) || defined(LVGL_RENDERER)
|
||||
#if defined(USE_DISPLAY)
|
||||
#ifdef USE_UNIVERSAL_DISPLAY
|
||||
|
||||
#define XDSP_17 17
|
||||
|
@ -462,7 +462,6 @@ void UDISP_Refresh(void) // Every second
|
|||
* Interface
|
||||
\*********************************************************************************************/
|
||||
|
||||
#ifndef LVGL_RENDERER
|
||||
bool Xdsp17(uint8_t function) {
|
||||
bool result = false;
|
||||
|
||||
|
@ -493,7 +492,6 @@ bool Xdsp17(uint8_t function) {
|
|||
}
|
||||
return result;
|
||||
}
|
||||
#endif // !LVGL_RENDERER
|
||||
|
||||
#endif // USE_UNIVERSAL_DISPLAY
|
||||
#endif // USE_DISPLAY
|
||||
|
|
Loading…
Reference in New Issue