relay: [#9] remove en pins from relaydevice

This commit is contained in:
Vasily Davydov 2023-05-13 00:26:48 +03:00
parent 07a6937077
commit c468a0d828
2 changed files with 4 additions and 10 deletions

View File

@ -10,14 +10,11 @@
#include "Log.h" #include "Log.h"
// TODO Remove en pins // TODO Remove en pins
RelayDevice::RelayDevice(uint8_t en_pin, RelayDevice::RelayDevice(uint8_t pha_pin,
uint8_t en_port,
uint8_t pha_pin,
uint8_t pha_port, uint8_t pha_port,
uint8_t relay_device_index uint8_t relay_device_index
) )
{ {
en = new DigitalIoPin(en_pin, en_port, false);
pha = new DigitalIoPin(pha_pin, pha_port, false); pha = new DigitalIoPin(pha_pin, pha_port, false);
LOG_DEBUG("Creating RelayDevice"); LOG_DEBUG("Creating RelayDevice");
} }

View File

@ -14,14 +14,11 @@
class RelayDevice { class RelayDevice {
public: public:
RelayDevice(uint8_t en_pin, RelayDevice(uint8_t pha_pin,
uint8_t en_port,
uint8_t pha_pin,
uint8_t pha_port, uint8_t pha_port,
uint8_t relay_device_index); uint8_t relay_device_index);
virtual ~RelayDevice(); virtual ~RelayDevice();
private: private:
DigitalIoPin * en;
DigitalIoPin * pha; DigitalIoPin * pha;
}; };
@ -32,8 +29,8 @@ public:
void taskFunction(); void taskFunction();
private: private:
ThreadCommon::QueueManager* _qm; ThreadCommon::QueueManager* _qm;
RelayDevice relays [2] = {{0, 23, 0, 24, 0}, RelayDevice relays [2] = {{0, 24, 0},
{0, 25, 0, 26, 1}}; {0, 26, 1}};
void parseEvent(Event * d); void parseEvent(Event * d);
int8_t setpoint, ext_temp; int8_t setpoint, ext_temp;