From 0275fbe0c91c70096d23a4289531502a56b16bcc Mon Sep 17 00:00:00 2001 From: Korneliusz Osmenda Date: Mon, 26 Sep 2022 15:50:15 +0200 Subject: [PATCH] Fix poweroff --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 4ee0669..f343450 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -155,7 +155,7 @@ void gpio_cb(const struct device *port, struct gpio_callback *cb, gpio_port_pins { state = STATE::SECOND; printt("Poweringoff"); - modbus_write_coil(client_iface, 1, 0x0000, 1); + atomic_set(&onoff,0); } else state = STATE::SECOND;