mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-12 01:59:05 +08:00
Fix transparency issue
add auto snapshot
This commit is contained in:
parent
adbbd9067c
commit
a71be60eff
@ -34,7 +34,7 @@
|
||||
#define ETH_FEATURE
|
||||
|
||||
//BLUETOOTH_FEATURE : enable BT Serial function
|
||||
#define BLUETOOTH_FEATURE
|
||||
//#define BLUETOOTH_FEATURE
|
||||
|
||||
//HTTP_FEATURE : enable HTTP function
|
||||
#define HTTP_FEATURE
|
||||
@ -161,6 +161,7 @@
|
||||
#if defined (DISPLAY_DEVICE) && (DISPLAY_UI_TYPE == UI_TYPE_ADVANCED)
|
||||
//allows to use [ESP216]SNAP to do screen capture
|
||||
#define DISPLAY_SNAPSHOT_FEATURE
|
||||
#define AUTO_SNAPSHOT_FEATURE
|
||||
#endif //DISPLAY_DEVICE
|
||||
|
||||
/************************************
|
||||
|
@ -168,10 +168,6 @@ bool Display::startCalibration()
|
||||
uint16_t calibrationData[5];
|
||||
show_screenID(CALIBRATION_SCREEN);
|
||||
update_screen(true);
|
||||
//display instructions
|
||||
/*uint size = getStringWidth("Touch corners as indicated");
|
||||
setTextFont(FONTCALIBRATION);
|
||||
drawString("Touch corners as indicated", (SCREEN_WIDTH-size)/2, (SCREEN_HEIGHT-16)/2, CALIBRATION_FG);*/
|
||||
esp3d_screen.calibrateTouch(calibrationData, CALIBRATION_CORNER, CALIBRATION_BG, 20);
|
||||
res = true;
|
||||
for (uint8_t i = 0; i < 5; i++) {
|
||||
@ -353,6 +349,13 @@ bool Display::display_IP(bool force)
|
||||
void Display::show_screenID(uint8_t screenID)
|
||||
{
|
||||
if (_screenID != screenID){
|
||||
#if defined(AUTO_SNAPSHOT_FEATURE)
|
||||
if (_screenID != -1){
|
||||
String s = "/snap" + String(_screenID);
|
||||
s+=".bin";
|
||||
snapshot((char *)s.c_str());
|
||||
}
|
||||
#endif //AUTO_SNAPSHOT_FEATURE
|
||||
_screenID = screenID;
|
||||
clear_screen();
|
||||
switch (screenID) {
|
||||
@ -630,11 +633,15 @@ void Display::progress(uint8_t v)
|
||||
|
||||
|
||||
|
||||
bool Display::snapshot()
|
||||
bool Display::snapshot(char * filename)
|
||||
{
|
||||
bool res = false;
|
||||
#if defined(DISPLAY_SNAPSHOT_FEATURE)
|
||||
fsSnapFile = ESP_FileSystem::open(SNAPFILENAME, ESP_FILE_WRITE);
|
||||
if(filename) {
|
||||
fsSnapFile = ESP_FileSystem::open(filename, ESP_FILE_WRITE);
|
||||
}else {
|
||||
fsSnapFile = ESP_FileSystem::open(SNAPFILENAME, ESP_FILE_WRITE);
|
||||
}
|
||||
if (!fsSnapFile) {
|
||||
return false;
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ public:
|
||||
void progress(uint8_t v);
|
||||
void SetStatus(const char * status);
|
||||
bool startCalibration();
|
||||
bool snapshot();
|
||||
bool snapshot(char * filename = nullptr);
|
||||
private:
|
||||
bool _started;
|
||||
uint8_t _screenID;
|
||||
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 2.6 KiB |
@ -41,7 +41,7 @@
|
||||
#define LV_COLOR_SCREEN_TRANSP 0
|
||||
|
||||
/*Images pixels with this color will not be drawn (with chroma keying)*/
|
||||
#define LV_COLOR_TRANSP LV_COLOR_MAKE( 0x00, 0xFF, 0x00)
|
||||
#define LV_COLOR_TRANSP LV_COLOR_MAKE( 0xFF, 0x00, 0xFF)
|
||||
|
||||
/* Enable anti-aliasing (lines, and radiuses will be smoothed) */
|
||||
#define LV_ANTIALIAS 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user