mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-22 21:36:11 +02:00
0.8.51
* added history protection mask * merge PR: display graph improvements #1347
This commit is contained in:
parent
f2c432a5cd
commit
ed3e93274e
5 changed files with 8 additions and 5 deletions
|
@ -4,6 +4,7 @@
|
|||
* fix translation #1346
|
||||
* further improve sending active power control command faster #1332
|
||||
* added history protection mask
|
||||
* merge PR: display graph improvements #1347
|
||||
|
||||
## 0.8.50 - 2024-01-09
|
||||
* merge PR: added history charts to web #1336
|
||||
|
|
|
@ -151,7 +151,7 @@ class Inverter {
|
|||
|
||||
static uint32_t *timestamp; // system timestamp
|
||||
static cfgInst_t *generalConfig; // general inverter configuration from setup
|
||||
static IApp *app; // pointer to app interface
|
||||
//static IApp *app; // pointer to app interface
|
||||
|
||||
public:
|
||||
|
||||
|
@ -288,7 +288,7 @@ class Inverter {
|
|||
if(isConnected) {
|
||||
mDevControlRequest = true;
|
||||
devControlCmd = cmd;
|
||||
app->triggerTickSend();
|
||||
//app->triggerTickSend(); // done in RestApi.h, because of "chicken-and-egg problem ;-)"
|
||||
}
|
||||
return isConnected;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ class HmSystem {
|
|||
void setup(uint32_t *timestamp, cfgInst_t *config, IApp *app) {
|
||||
mInverter[0].timestamp = timestamp;
|
||||
mInverter[0].generalConfig = config;
|
||||
mInverter[0].app = app;
|
||||
//mInverter[0].app = app;
|
||||
}
|
||||
|
||||
void addInverter(uint8_t id, std::function<void(Inverter<> *iv)> cb) {
|
||||
|
|
|
@ -135,7 +135,7 @@ class DisplayMono {
|
|||
}
|
||||
|
||||
void initPowerGraph(uint8_t width, uint8_t height) {
|
||||
DBGPRINTLN("---- Init Power Graph ----");
|
||||
DBGPRINTLN(F("---- Init Power Graph ----"));
|
||||
mPgWidth = width;
|
||||
mPgHeight = height;
|
||||
mPgData = new float[mPgWidth];
|
||||
|
@ -207,7 +207,7 @@ class DisplayMono {
|
|||
mDisplay->drawLine(xoff, yoff, xoff + mPgWidth, yoff); // horizontal axis
|
||||
|
||||
// do not draw as long as time is not set correctly and no data was received
|
||||
if ((mDisplayData->pGraphStartTime == 0) || (mDisplayData->pGraphEndTime == 0) || (mDisplayData->utcTs < 1) || (mPgMaxPwr < 1) || (mPgLastPos < 1))
|
||||
if ((mDisplayData->pGraphStartTime == 0) || (mDisplayData->pGraphEndTime == 0) || (mDisplayData->utcTs != 0) || (mPgMaxPwr != 0) || (mPgLastPos != 0))
|
||||
return;
|
||||
|
||||
// draw X scale
|
||||
|
|
|
@ -842,6 +842,8 @@ class RestApi {
|
|||
iv->powerLimit[1] = AbsolutNonPersistent;
|
||||
|
||||
accepted = iv->setDevControlRequest(ActivePowerContr);
|
||||
if(accepted)
|
||||
mApp->triggerTickSend();
|
||||
} else if(F("dev") == jsonIn[F("cmd")]) {
|
||||
DPRINTLN(DBG_INFO, F("dev cmd"));
|
||||
iv->setDevCommand(jsonIn[F("val")].as<int>());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue