File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
components/philips_series_2200/switch Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -40,20 +40,20 @@ namespace esphome
4040 if (state)
4141 {
4242 // Send pre-power on message
43- for (unsigned int i = 0 ; i <= MESSAGE_REPETITIONS ; i++)
43+ for (unsigned int i = 0 ; i <= POWER_MESSAGE_REPETITIONS ; i++)
4444 mainboard_uart_->write_array (command_pre_power_on);
4545
4646 // Send power on message
4747 if (cleaning_)
4848 {
4949 // Send power on command with cleaning
50- for (unsigned int i = 0 ; i <= MESSAGE_REPETITIONS ; i++)
50+ for (unsigned int i = 0 ; i <= POWER_MESSAGE_REPETITIONS ; i++)
5151 mainboard_uart_->write_array (command_power_with_cleaning);
5252 }
5353 else
5454 {
5555 // Send power on command without cleaning
56- for (unsigned int i = 0 ; i <= MESSAGE_REPETITIONS ; i++)
56+ for (unsigned int i = 0 ; i <= POWER_MESSAGE_REPETITIONS ; i++)
5757 mainboard_uart_->write_array (command_power_without_cleaning);
5858 }
5959
@@ -66,7 +66,7 @@ namespace esphome
6666 else
6767 {
6868 // Send power off message
69- for (unsigned int i = 0 ; i <= MESSAGE_REPETITIONS ; i++)
69+ for (unsigned int i = 0 ; i <= POWER_MESSAGE_REPETITIONS ; i++)
7070 mainboard_uart_->write_array (command_power_off);
7171 mainboard_uart_->flush ();
7272 }
Original file line number Diff line number Diff line change 55#include " esphome/components/uart/uart.h"
66#include " ../commands.h"
77
8- #define MESSAGE_REPETITIONS 5
8+ #define POWER_MESSAGE_REPETITIONS 25
99#define POWER_TRIP_RETRY_DELAY 100
1010#define MAX_POWER_TRIP_COUNT 5
1111
You can’t perform that action at this time.
0 commit comments