mirror of
https://github.com/OpenEPaperLink/OpenEPaperLink.git
synced 2026-03-21 18:06:16 +01:00
- AP info screen content card. Can run on any tag.
- now, you can use {variables} in the 'text' entries in a json template. You can set variables via a http call. If you update a variable, all tags with a json template containing that variable get updated.
- font name in json template is more flexible. You can just use 'filename.ttf' or 'filename.vlw'. A full path is still possible.
- colors in the json template can now be set using #rrggbb color values, and using 'black', 'white' or 'red'.
- added direct output for the TFT display for the yellow esp32-s3. No file writes needed.
- added POST variable 'ttl' to json template upload and image upload, to set the next checkin time
- added /variables-demo.html to demonstrate the variables.
- json templates received from jsonupload are now saved in /current, and reused.
- known issue: 'backup db' button doesn't work due to some browser policy change. Fixing.
thanks to @steinwedel for the inspiration on the variables and some other fixes.
28 lines
529 B
C
28 lines
529 B
C
#include <Arduino.h>
|
|
#include <TFT_eSPI.h>
|
|
|
|
#pragma once
|
|
|
|
extern TFT_eSPI tft;
|
|
|
|
struct imgParam {
|
|
bool hasRed;
|
|
uint8_t dataType;
|
|
bool dither;
|
|
bool grayLut = false;
|
|
uint8_t bufferbpp = 8;
|
|
uint8_t rotate = 0;
|
|
|
|
uint16_t width;
|
|
uint16_t height;
|
|
uint8_t rotatebuffer;
|
|
uint8_t bpp;
|
|
|
|
char segments[12];
|
|
uint16_t symbols;
|
|
bool invert;
|
|
};
|
|
|
|
void spr2buffer(TFT_eSprite &spr, String &fileout, imgParam &imageParams);
|
|
void jpg2buffer(String filein, String fileout, imgParam &imageParams);
|