-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- [breakable change] refactoring userconfig from EEPROM to local json…
… file incl. web config interface - introduce another display (GAGC9A01 round TFT 1.28) - implement a better factory mode with display support - extend the docs
- Loading branch information
Showing
18 changed files
with
1,007 additions
and
231 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#ifndef DISPLAYTFT_H | ||
#define DISPLAYTFT_H | ||
|
||
#include <SPI.h> | ||
#include <TFT_eSPI.h> | ||
|
||
// TFT display | ||
|
||
#define BRIGHTNESS_MIN 50 | ||
#define BRIGHTNESS_MAX 250 | ||
|
||
#define DARKER_GREY 0x18E3 | ||
#define SPECIAL_BLUE 0x24ae | ||
|
||
struct DisplayDataTFT { | ||
int16_t totalPower=0; // indicate current power (W) | ||
float totalYieldDay=0.0f; // indicate day yield (Wh) | ||
float totalYieldTotal=0.0f; // indicate total yield (kWh) | ||
const char *formattedTime=nullptr; | ||
const char *version=nullptr; | ||
uint8_t powerLimit=0; | ||
uint8_t rssiGW=0; | ||
uint8_t rssiDTU=0; | ||
bool stateWasOffline=false; | ||
bool stateWasCloudPause=true; | ||
bool stateWasNormal=false; | ||
}; | ||
|
||
class DisplayTFT { | ||
public: | ||
DisplayTFT(); | ||
void setup(); | ||
void renderScreen(String time, String version); | ||
void drawFactoryMode(String version, String apName, String ip); | ||
private: | ||
void drawScreen(String version, String time); | ||
void drawHeader(String version); | ||
void drawFooter(String time); | ||
|
||
void drawMainDTUOnline(bool pause=false); | ||
void drawMainDTUOffline(); | ||
|
||
void screenSaver(); | ||
void checkChangedValues(); | ||
|
||
void drawIcon(const uint16_t *icon, int16_t x, int16_t y, int16_t w, int16_t h); | ||
|
||
// private member variables | ||
DisplayDataTFT lastDisplayData; | ||
uint8_t brightness=BRIGHTNESS_MIN; | ||
uint8_t offset_x = 0; // shifting for anti burn in effect | ||
uint8_t offset_y = 0; // shifting for anti burn in effect | ||
bool valueChanged = false; | ||
uint16_t displayTicks = 0; // local timer state machine | ||
}; | ||
|
||
#endif // DISPLAYTFT_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#define VERSION "1.5.0_localDev" | ||
#define BUILDTIME "01.06.2024 - 17:49:18" | ||
#define BUILDTIMESTAMP "1717256958" | ||
#define VERSION "1.6.0_localDev" | ||
#define BUILDTIME "05.06.2024 - 19:12:17" | ||
#define BUILDTIMESTAMP "1717607537" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"version": "1.5.0_localDev", | ||
"versiondate": "01.06.2024 - 17:49:18", | ||
"linksnapshot": "https://github.com/ohAnd/dtuGateway/releases/download/snapshot/dtuGateway_snapshot_1.5.0_localDev.bin", | ||
"link": "https://github.com/ohAnd/dtuGateway//releases/latest/download/dtuGateway_release_1.5.0_localDev.bin" | ||
"version": "1.6.0_localDev", | ||
"versiondate": "05.06.2024 - 19:12:17", | ||
"linksnapshot": "https://github.com/ohAnd/dtuGateway/releases/download/snapshot/dtuGateway_snapshot_1.6.0_localDev.bin", | ||
"link": "https://github.com/ohAnd/dtuGateway//releases/latest/download/dtuGateway_release_1.6.0_localDev.bin" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.