From 8356db94b9ca6a42759de8424b713f2b7b4f8268 Mon Sep 17 00:00:00 2001 From: Thomas Basler Date: Tue, 11 Apr 2023 22:20:13 +0200 Subject: [PATCH] Send ChannelChangeCommand only once per cycle as the inverter will not response at all --- lib/Hoymiles/src/commands/ChannelChangeCommand.cpp | 6 ++++++ lib/Hoymiles/src/commands/ChannelChangeCommand.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/lib/Hoymiles/src/commands/ChannelChangeCommand.cpp b/lib/Hoymiles/src/commands/ChannelChangeCommand.cpp index c6f8dde..139bbea 100644 --- a/lib/Hoymiles/src/commands/ChannelChangeCommand.cpp +++ b/lib/Hoymiles/src/commands/ChannelChangeCommand.cpp @@ -37,3 +37,9 @@ bool ChannelChangeCommand::handleResponse(InverterAbstract* inverter, fragment_t { return true; } + +uint8_t ChannelChangeCommand::getMaxResendCount() +{ + // This command will never retrieve an answer. Therefor it's not required to repeat it + return 0; +} \ No newline at end of file diff --git a/lib/Hoymiles/src/commands/ChannelChangeCommand.h b/lib/Hoymiles/src/commands/ChannelChangeCommand.h index f8f0eab..b646217 100644 --- a/lib/Hoymiles/src/commands/ChannelChangeCommand.h +++ b/lib/Hoymiles/src/commands/ChannelChangeCommand.h @@ -13,4 +13,6 @@ public: uint8_t getChannel(); virtual bool handleResponse(InverterAbstract* inverter, fragment_t fragment[], uint8_t max_fragment_id); + + virtual uint8_t getMaxResendCount(); }; \ No newline at end of file