mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-22 21:36:11 +02:00
0.8.55
* merge PR: fix reboot problem with deactivated power graph #1360
This commit is contained in:
parent
767afc17fb
commit
0fb98518ea
3 changed files with 7 additions and 5 deletions
|
@ -1,5 +1,8 @@
|
|||
# Development Changes
|
||||
|
||||
## 0.8.55 - 2024-01-14
|
||||
* merge PR: fix reboot problem with deactivated power graph #1360
|
||||
|
||||
## 0.8.54 - 2024-01-13
|
||||
* added minimal version (without: MqTT, Display, History), WebUI is not changed!
|
||||
* added simulator (must be activated before compile, standard: off)
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//-------------------------------------
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 8
|
||||
#define VERSION_PATCH 54
|
||||
#define VERSION_PATCH 55
|
||||
|
||||
//-------------------------------------
|
||||
typedef struct {
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#endif
|
||||
#include "../../utils/helper.h"
|
||||
#include "Display_data.h"
|
||||
#include "config/settings.h"
|
||||
#include "../../utils/dbg.h"
|
||||
#include "../../utils/timemonitor.h"
|
||||
|
||||
|
@ -185,7 +184,7 @@ class DisplayMono {
|
|||
}
|
||||
|
||||
void addPowerGraphEntry(float val) {
|
||||
if ((mPgData != nullptr) && (mDisplayData->utcTs > 0)) { // precondition: power graph initialized and utc time available
|
||||
if ((nullptr != mPgData) && (mDisplayData->utcTs > 0)) { // precondition: power graph initialized and utc time available
|
||||
calcPowerGraphValues();
|
||||
//mPgData[mPgLastPos] = std::max(mPgData[mPgLastPos], (uint8_t) (val * 255.0 / mPgMaxAvailPower)); // normalizing of data to 0-255
|
||||
mPgData[mPgLastPos] = std::max(mPgData[mPgLastPos], val);
|
||||
|
@ -206,7 +205,7 @@ class DisplayMono {
|
|||
}
|
||||
|
||||
void plotPowerGraph(uint8_t xoff, uint8_t yoff) {
|
||||
if (mPgData == nullptr) // power graph not initialized
|
||||
if (nullptr == mPgData) // power graph not initialized
|
||||
return;
|
||||
|
||||
// draw axes
|
||||
|
@ -214,7 +213,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 == 0) || (mPgMaxPwr < 1) || (mPgLastPos == 0))
|
||||
if ((0 == mDisplayData->pGraphStartTime) || (0 == mDisplayData->pGraphEndTime) || (0 == mDisplayData->utcTs) || (mPgMaxPwr < 1) || (0 == mPgLastPos))
|
||||
return;
|
||||
|
||||
// draw X scale
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue