code beautifying

This commit is contained in:
Martin Brodbeck 2022-05-31 14:28:15 +02:00
parent d354be1077
commit 2f7d1dd921
2 changed files with 5 additions and 9 deletions

View file

@ -14,10 +14,6 @@ void Relais::activate(bool active) {
} }
} }
void Relais::on() { void Relais::on() { activate(true); }
activate(true);
}
void Relais::off() { void Relais::off() { activate(false); }
activate(false);
}

View file

@ -1,17 +1,17 @@
#ifndef RELAIS_H #ifndef RELAIS_H
#define RELAIS_H #define RELAIS_H
#include "pico/stdlib.h"
#include "hardware/gpio.h" #include "hardware/gpio.h"
#include "pico/stdlib.h"
class Relais { class Relais {
public: public:
Relais(uint gpio); Relais(uint gpio);
void activate(bool active); void activate(bool active);
void on(); void on();
void off(); void off();
private: private:
uint gpio; uint gpio;
}; };