mirror of https://github.com/arendst/Tasmota.git
Add Shelly Pro 4PM to lvgl binary
This commit is contained in:
parent
57ff415d0e
commit
c699131103
|
@ -346,7 +346,10 @@
|
|||
|
||||
#define USE_DS18x20 // Add support for DS18x20 sensors with id sort, single scan and read retry (+1k3 code)
|
||||
|
||||
#undef USE_ENERGY_SENSOR
|
||||
|
||||
#define USE_ENERGY_SENSOR // Add energy to support Shelly Pro 4PM display (+38k code)
|
||||
#define USE_ADE7953
|
||||
#define USE_SHELLY_PRO
|
||||
|
||||
|
||||
#define USE_I2C // I2C using library wire (+10k code, 0k2 mem, 124 iram)
|
||||
|
|
|
@ -19,15 +19,9 @@
|
|||
|
||||
#ifdef ESP8266
|
||||
#ifdef USE_ENERGY_SENSOR
|
||||
#define USE_ENERGY_SENSOR_LEGACY
|
||||
#endif // USE_ENERGY_SENSOR
|
||||
#endif // ESP8266
|
||||
|
||||
#ifdef USE_ENERGY_SENSOR_LEGACY
|
||||
/*********************************************************************************************\
|
||||
* Energy for ESP8266 and legacy ESP32 with max three phases/channels using Settings from flash
|
||||
\*********************************************************************************************/
|
||||
//#warning **** USE_ENERGY_SENSOR_LEGACY ****
|
||||
|
||||
#define XDRV_03 3
|
||||
#define XSNS_03 3
|
||||
|
@ -1518,4 +1512,5 @@ bool Xsns03(uint32_t function)
|
|||
return result;
|
||||
}
|
||||
|
||||
#endif // USE_ENERGY_SENSOR_V1
|
||||
#endif // USE_ENERGY_SENSOR
|
||||
#endif // ESP8266
|
||||
|
|
|
@ -19,15 +19,9 @@
|
|||
|
||||
#ifdef ESP32
|
||||
#ifdef USE_ENERGY_SENSOR
|
||||
#define USE_ENERGY_SENSOR_ESP32
|
||||
#endif // USE_ENERGY_SENSOR
|
||||
#endif // ESP32
|
||||
|
||||
#ifdef USE_ENERGY_SENSOR_ESP32
|
||||
/*********************************************************************************************\
|
||||
* Energy for ESP32 with max eight phases/channels using more RAM and Settings from filesystem
|
||||
\*********************************************************************************************/
|
||||
//#warning **** USE_ENERGY_SENSOR_ESP32 ****
|
||||
|
||||
#define XDRV_03 3
|
||||
#define XSNS_03 3
|
||||
|
@ -1798,4 +1792,5 @@ bool Xsns03(uint32_t function)
|
|||
return result;
|
||||
}
|
||||
|
||||
#endif // USE_ENERGY_SENSOR_ESP32
|
||||
#endif // USE_ENERGY_SENSOR
|
||||
#endif // ESP32
|
||||
|
|
|
@ -17,7 +17,8 @@
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#if defined(USE_ENERGY_SENSOR_ESP32) && defined(USE_I2C)
|
||||
#ifdef ESP32
|
||||
#if defined(USE_ENERGY_SENSOR) && defined(USE_I2C)
|
||||
#ifdef USE_BIOPDU
|
||||
/*********************************************************************************************\
|
||||
Biomine 625x12 Custom Board
|
||||
|
@ -65,14 +66,7 @@
|
|||
|
||||
#define XNRG_24 24
|
||||
|
||||
#undef ENERGY_MAX_PHASES
|
||||
#define ENERGY_MAX_PHASES 6 // BioPDU support max six phases/channels
|
||||
|
||||
#undef ENERGY_GUI_MAX_COLS
|
||||
#define ENERGY_GUI_MAX_COLS 6 // [EnergyCols] Number of GUI data columns - Preffered 6
|
||||
|
||||
#undef ENERGY_GUI_DISPLAY_MODE
|
||||
#define ENERGY_GUI_DISPLAY_MODE ENERGY_DISPLAY_TABS // [EnergyDisplay] 1 = Rotate if over EnergyCols, 2 = Rotate only powered on if over EnergyCols, 3 = Use tabs if over EnergyCols
|
||||
#define BIOPDU_MAX_PHASES 6 // BioPDU support max six phases/channels
|
||||
|
||||
const uint8_t BIOPDU_DEVICE_ADDRESS = 0x01; // PZEM default address
|
||||
const uint32_t BIOPDU_STABILIZE = 30; // Number of seconds to stabilize configuration
|
||||
|
@ -241,7 +235,7 @@ void BioPduDrvInit(void)
|
|||
}
|
||||
}
|
||||
|
||||
Energy->phase_count = std::min((uint8_t)(pow(2, BioPdu.pins) - 1), (uint8_t)ENERGY_MAX_PHASES); // Start off with 6 phases
|
||||
Energy->phase_count = std::min((uint8_t)(pow(2, BioPdu.pins) - 1), (uint8_t)BIOPDU_MAX_PHASES); // Start off with 6 phases
|
||||
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("PDU: number of pins=%d, max_phase=%d"), BioPdu.pins, Energy->phase_count);
|
||||
}
|
||||
|
@ -299,3 +293,4 @@ bool Xnrg24(uint32_t function)
|
|||
|
||||
#endif // USE_BIOPDU
|
||||
#endif // USE_ENERGY_SENSOR
|
||||
#endif // ESP32
|
Loading…
Reference in New Issue