bla
This commit is contained in:
@@ -14,7 +14,7 @@ namespace output
|
||||
namespace items
|
||||
{
|
||||
|
||||
Lamp::Lamp(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, int i2c_address, int data_pin, std::string name, bool activated)
|
||||
Lamp::Lamp(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, unsigned int i2c_address, unsigned int data_pin, std::string name, bool activated)
|
||||
:
|
||||
OutputItem(output_gpio_interface, i2c_address, data_pin, name),
|
||||
activated(activated)
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace items
|
||||
class Lamp : public OutputItem, ILamp
|
||||
{
|
||||
public:
|
||||
Lamp(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, int i2c_address, int data_pin, std::string name, bool activated = false);
|
||||
Lamp(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, unsigned int i2c_address, unsigned int data_pin, std::string name, bool activated = false);
|
||||
virtual ~Lamp() = default;
|
||||
|
||||
void activate();
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace output
|
||||
namespace items
|
||||
{
|
||||
|
||||
OutputItem::OutputItem(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, int i2c_address, int data_pin_address, std::string name)
|
||||
OutputItem::OutputItem(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, unsigned int i2c_address, unsigned int data_pin_address, std::string name)
|
||||
: i2c_address(i2c_address), data_pin_address(data_pin_address), name(name), output_gpio_interface(output_gpio_interface)
|
||||
{}
|
||||
|
||||
|
||||
@@ -25,14 +25,14 @@ namespace items
|
||||
class OutputItem : public IOutputItem
|
||||
{
|
||||
public:
|
||||
OutputItem(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, int i2c_address, int data_pin_address, std::string name);
|
||||
OutputItem(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, unsigned int i2c_address, unsigned int data_pin_address, std::string name);
|
||||
virtual ~OutputItem();
|
||||
|
||||
protected:
|
||||
int i2c_address, data_pin_address;
|
||||
std::string name;
|
||||
const unsigned int i2c_address, data_pin_address;
|
||||
const std::string name;
|
||||
|
||||
std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface;
|
||||
const std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface;
|
||||
|
||||
protected:
|
||||
void activate();
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace output
|
||||
namespace items
|
||||
{
|
||||
|
||||
Solenoid::Solenoid(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, int i2c_address, int data_pin, std::string name, std::chrono::milliseconds deactivation_time)
|
||||
Solenoid::Solenoid(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, unsigned int i2c_address, unsigned int data_pin, std::string name, std::chrono::milliseconds deactivation_time)
|
||||
:
|
||||
OutputItem(output_gpio_interface, i2c_address, data_pin, name),
|
||||
deactivation_time(deactivation_time)
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace items
|
||||
class Solenoid : public ISolenoid, OutputItem
|
||||
{
|
||||
public:
|
||||
Solenoid(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, int i2c_address, int data_pin, std::string name, std::chrono::milliseconds deactivation_time);
|
||||
Solenoid(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, unsigned int i2c_address, unsigned int data_pin, std::string name, std::chrono::milliseconds deactivation_time);
|
||||
virtual ~Solenoid() = default;
|
||||
|
||||
void trigger();
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace output
|
||||
namespace items
|
||||
{
|
||||
|
||||
Sound::Sound(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, int i2c_address, int data_pin, std::string name)
|
||||
Sound::Sound(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, unsigned int i2c_address, unsigned int data_pin, std::string name)
|
||||
:
|
||||
OutputItem(output_gpio_interface, i2c_address, data_pin, name),
|
||||
deactivation_time(deactivation_time)
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace items
|
||||
class Sound : public ISound, OutputItem
|
||||
{
|
||||
public:
|
||||
Sound(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, int i2c_address, int data_pin, std::string name, std::chrono::milliseconds deactivation_time);
|
||||
Sound(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, unsigned int i2c_address, unsigned int data_pin, std::string name, std::chrono::milliseconds deactivation_time);
|
||||
virtual ~Sound() = default;
|
||||
|
||||
virtual void play();
|
||||
|
||||
@@ -27,7 +27,7 @@ public:
|
||||
|
||||
virtual ~GPIOInterface()
|
||||
{};
|
||||
|
||||
/* todo ???? */
|
||||
static void initialize_input_pin(char address);
|
||||
|
||||
static void initialize_output_pin(char address);
|
||||
|
||||
Reference in New Issue
Block a user