From 201098ae0bc1874c5b4a81a1187d0a1b840aca12 Mon Sep 17 00:00:00 2001 From: lumapu Date: Wed, 30 Aug 2023 00:06:32 +0200 Subject: [PATCH] 0.7.45 * change ePaper text to symbols PR #1131 * added some invertes to dev info list #1111 --- src/CHANGES.md | 4 +++ src/defines.h | 2 +- src/hm/hmDefines.h | 47 +++++++++++++++++++++++----- src/plugins/Display/Display_ePaper.h | 42 ++++++++++++------------- 4 files changed, 66 insertions(+), 29 deletions(-) diff --git a/src/CHANGES.md b/src/CHANGES.md index a16a638e..974c7282 100644 --- a/src/CHANGES.md +++ b/src/CHANGES.md @@ -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 diff --git a/src/defines.h b/src/defines.h index ca67f8fb..8a125bfa 100644 --- a/src/defines.h +++ b/src/defines.h @@ -13,7 +13,7 @@ //------------------------------------- #define VERSION_MAJOR 0 #define VERSION_MINOR 7 -#define VERSION_PATCH 44 +#define VERSION_PATCH 45 //------------------------------------- typedef struct { diff --git a/src/hm/hmDefines.h b/src/hm/hmDefines.h index 7b1549ab..87d47699 100644 --- a/src/hm/hmDefines.h +++ b/src/hm/hmDefines.h @@ -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", @@ -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 @@ -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__*/ diff --git a/src/plugins/Display/Display_ePaper.h b/src/plugins/Display/Display_ePaper.h index 65c5b91a..e89c191b 100644 --- a/src/plugins/Display/Display_ePaper.h +++ b/src/plugins/Display/Display_ePaper.h @@ -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); + 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(); + 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; + 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