mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 10:46:31 +00:00
Add commands PowerCal, VoltageCal and CurrentCall
Add commands PowerCal, VoltageCal and CurrentCall to CSE7766/HLW8032 energy driver
This commit is contained in:
parent
387d3486d5
commit
1c1f6c638f
@ -255,7 +255,10 @@ void CseDrvInit(void) {
|
|||||||
bool CseCommand(void) {
|
bool CseCommand(void) {
|
||||||
bool serviced = true;
|
bool serviced = true;
|
||||||
|
|
||||||
if (CMND_POWERSET == Energy->command_code) {
|
if ((CMND_POWERCAL == Energy->command_code) || (CMND_VOLTAGECAL == Energy->command_code) || (CMND_CURRENTCAL == Energy->command_code)) {
|
||||||
|
// Service in xdrv_03_energy.ino
|
||||||
|
}
|
||||||
|
else if (CMND_POWERSET == Energy->command_code) {
|
||||||
if (XdrvMailbox.data_len && Cse.power_cycle) {
|
if (XdrvMailbox.data_len && Cse.power_cycle) {
|
||||||
XdrvMailbox.payload = (unsigned long)(CharToFloat(XdrvMailbox.data) * Cse.power_cycle) / CSE_PREF;
|
XdrvMailbox.payload = (unsigned long)(CharToFloat(XdrvMailbox.data) * Cse.power_cycle) / CSE_PREF;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user