From 2f7d1dd921e5b46f8492ea21e0ed080506f4405c Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Tue, 31 May 2022 14:28:15 +0200 Subject: [PATCH] code beautifying --- relais.cpp | 8 ++------ relais.h | 6 +++--- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/relais.cpp b/relais.cpp index 185868e..62b8712 100644 --- a/relais.cpp +++ b/relais.cpp @@ -14,10 +14,6 @@ void Relais::activate(bool active) { } } -void Relais::on() { - activate(true); -} +void Relais::on() { activate(true); } -void Relais::off() { - activate(false); -} \ No newline at end of file +void Relais::off() { activate(false); } \ No newline at end of file diff --git a/relais.h b/relais.h index f35fbee..fcc357e 100644 --- a/relais.h +++ b/relais.h @@ -1,17 +1,17 @@ #ifndef RELAIS_H #define RELAIS_H -#include "pico/stdlib.h" #include "hardware/gpio.h" +#include "pico/stdlib.h" class Relais { - public: + public: Relais(uint gpio); void activate(bool active); void on(); void off(); - private: + private: uint gpio; };