Skip to content

Commit

Permalink
0.8.51
Browse files Browse the repository at this point in the history
* added history protection mask
* merge PR: display graph improvements #1347
  • Loading branch information
lumapu committed Jan 10, 2024
1 parent f2c432a commit ed3e932
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/hm/hmInverter.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/hm/hmSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/Display/Display_Mono.h
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/web/RestApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>());
Expand Down

0 comments on commit ed3e932

Please sign in to comment.