Skip to content

Commit

Permalink
0.7.45
Browse files Browse the repository at this point in the history
* change ePaper text to symbols PR #1131
* added some invertes to dev info list #1111
  • Loading branch information
lumapu committed Aug 29, 2023
1 parent 91a21b0 commit 201098a
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 31 deletions.
4 changes: 4 additions & 0 deletions src/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Development Changes

## 0.7.45 - 2023-08-29
* change ePaper text to symbols PR #1131
* added some invertes to dev info list #1111

## 0.7.44 - 2023-08-28
* fix `last_success` transmitted to often #1124

Expand Down
2 changes: 1 addition & 1 deletion src/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
//-------------------------------------
#define VERSION_MAJOR 0
#define VERSION_MINOR 7
#define VERSION_PATCH 44
#define VERSION_PATCH 45

//-------------------------------------
typedef struct {
Expand Down
47 changes: 40 additions & 7 deletions src/hm/hmDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ enum {FLD_UDC = 0, FLD_IDC, FLD_PDC, FLD_YD, FLD_YW, FLD_YT,
FLD_FW_BUILD_MONTH_DAY, FLD_FW_BUILD_HOUR_MINUTE, FLD_BOOTLOADER_VER,
FLD_ACT_ACTIVE_PWR_LIMIT, FLD_PART_NUM, FLD_HW_VERSION, FLD_GRID_PROFILE_CODE,
FLD_GRID_PROFILE_VERSION, /*FLD_ACT_REACTIVE_PWR_LIMIT, FLD_ACT_PF,*/ FLD_LAST_ALARM_CODE, FLD_MP};

const char* const fields[] = {"U_DC", "I_DC", "P_DC", "YieldDay", "YieldWeek", "YieldTotal",
"U_AC", "U_AC_1N", "U_AC_2N", "U_AC_3N", "UAC_12", "UAC_23", "UAC_31", "I_AC",
"IAC_1", "I_AC_2", "I_AC_3", "P_AC", "F_AC", "Temp", "PF_AC", "Efficiency", "Irradiation","Q_AC",
Expand Down Expand Up @@ -259,20 +259,52 @@ typedef struct {
uint16_t maxPower;
} devInfo_t;

// https://github.com/lumapu/ahoy/issues/1111
// Hardware number:
// 0xAABBCCDD
// ^^ ------- always 10 (for MI, HM, HMS, HMT)
// ^ ------ 0 = MI
// 1 = HM
// 1, 2 = HMS (version)
// 3 = HMT
// ^ ----- 0 = 1 Input
// 1 = 2 Inputs
// 2 = 4 Inputs
// 3 = 6 Inputs
// ^ ---- 0 = smallest with x inputs
// 7 = biggest with x inputs

const devInfo_t devInfo[] = {
// MI 3rd gen
{ 0x001311, 600 },
{ 0x001411, 700 },
{ 0x002111, 1000 },
{ 0x002311, 1200 },
{ 0x002411, 1500 },
{ 0x002511, 1500 },

{ 0x100000, 250 },
{ 0x100010, 300 },
{ 0x100020, 350 },
{ 0x100030, 400 },
{ 0x100100, 500 },
{ 0x100110, 600 },
{ 0x100120, 700 },
{ 0x100130, 800 },
{ 0x100200, 1000 },
{ 0x100210, 1200 },
{ 0x100230, 1500 },

// HM
{ 0x101010, 300 },
{ 0x101020, 350 },
{ 0x101030, 400 },
{ 0x101040, 400 },
{ 0x101110, 600 }, // [TSOL800(DE) ..20, HWv=??], [HM-600 ..20, HWv=2.66]
{ 0x101110, 600 }, // [TSOL800(DE) ..20, HWv=2.66], [HM-600 ..20, HWv=2.66]
{ 0x101120, 700 },
{ 0x101130, 800 },
{ 0x101140, 800 },
{ 0x101210, 1200 }, // ..00
{ 0x101200, 1000 },
{ 0x101210, 1200 },
{ 0x101230, 1500 },

// HMS
Expand All @@ -281,18 +313,19 @@ const devInfo_t devInfo[] = {
{ 0x101051, 450 },
{ 0x101071, 500 },
{ 0x102111, 600 },
{ 0x101120, 700 },
{ 0x102141, 800 },
{ 0x101151, 900 },
{ 0x102171, 1000 },
{ 0x102241, 1600 },
{ 0x101251, 1800 },
{ 0x102251, 1800 },
{ 0x101271, 2000 }, // ..00
{ 0x102271, 2000 },
{ 0x101271, 2000 }, // v1 grey backplane, 14A
{ 0x102271, 2000 }, // v2 black backplane, 16A

// HMT
{ 0x103311, 1800 },
{ 0x103331, 2250 } // ..00
{ 0x103331, 2250 }
};

#endif /*__HM_DEFINES_H__*/
46 changes: 23 additions & 23 deletions src/plugins/Display/Display_ePaper.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,29 @@
// GDEH0154D67 1.54" b/w 200x200

class DisplayEPaper {
public:
DisplayEPaper();
void fullRefresh();
void init(uint8_t type, uint8_t _CS, uint8_t _DC, uint8_t _RST, uint8_t _BUSY, uint8_t _SCK, uint8_t _MOSI, uint32_t* utcTs, const char* version);
void config(uint8_t rotation, bool enPowerSafe);
void loop(float totalPower, float totalYieldDay, float totalYieldTotal, uint8_t isprod);

private:
void headlineIP();
void actualPowerPaged(float _totalPower, float _totalYieldDay, float _totalYieldTotal, uint8_t _isprod);
void lastUpdatePaged();
void offlineFooter();
void versionFooter();

uint8_t mDisplayRotation;
bool _changed = false;
char _fmtText[35];
const char* _settedIP;
uint8_t mHeadFootPadding;
GxEPD2_GFX* _display;
uint32_t* mUtcTs;
bool mEnPowerSafe;
const char* _version;
public:
DisplayEPaper();
void fullRefresh();
void init(uint8_t type, uint8_t _CS, uint8_t _DC, uint8_t _RST, uint8_t _BUSY, uint8_t _SCK, uint8_t _MOSI, uint32_t* utcTs, const char* version);
void config(uint8_t rotation, bool enPowerSafe);
void loop(float totalPower, float totalYieldDay, float totalYieldTotal, uint8_t isprod);

private:
void headlineIP();
void actualPowerPaged(float _totalPower, float _totalYieldDay, float _totalYieldTotal, uint8_t _isprod);
void lastUpdatePaged();
void offlineFooter();
void versionFooter();

uint8_t mDisplayRotation;
bool _changed = false;
char _fmtText[35];
const char* _settedIP;
uint8_t mHeadFootPadding;
GxEPD2_GFX* _display;
uint32_t* mUtcTs;
bool mEnPowerSafe;
const char* _version;
};

#endif // ESP32

0 comments on commit 201098a

Please sign in to comment.