-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge last develop into migrate_ESP32 - fixing littlefs init on facto…
…ry state - fixing webpage stream - basic features config, first setup, web page, OLED for both arch ok
- Loading branch information
Showing
24 changed files
with
2,123 additions
and
436 deletions.
There are no files selected for viewing
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,38 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Smartphone (please complete the following information):** | ||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser [e.g. stock browser, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
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,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#ifndef DISPLAY_H | ||
#define DISPLAY_H | ||
|
||
#include <U8g2lib.h> | ||
|
||
// OLED display | ||
|
||
#define BRIGHTNESS_MIN 50 | ||
#define BRIGHTNESS_MAX 250 | ||
|
||
struct DisplayData { | ||
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; | ||
}; | ||
|
||
class Display { | ||
public: | ||
Display(); | ||
void setup(); | ||
void renderScreen(String time, String version); | ||
void drawFactoryMode(String version, String apName, String ip); | ||
private: | ||
void drawScreen(); | ||
void drawHeader(); | ||
void drawFooter(); | ||
|
||
void drawMainDTUOnline(bool pause=false); | ||
void drawMainDTUOffline(); | ||
|
||
void screenSaver(); | ||
void checkChangedValues(); | ||
// private member variables | ||
DisplayData lastDisplayData; | ||
uint8_t brightness=BRIGHTNESS_MIN; | ||
u8g2_uint_t offset_x = 0; // shifting for anti burn in effect | ||
u8g2_uint_t offset_y = 0; // shifting for anti burn in effect | ||
bool valueChanged = false; | ||
uint16_t displayTicks = 0; // local timer state machine | ||
}; | ||
|
||
#endif // DISPLAY_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
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
Oops, something went wrong.