Fixed logic error in relais

This commit is contained in:
Martin Brodbeck 2022-06-01 21:14:22 +02:00
parent bde19fd2b7
commit d6ea24685b
2 changed files with 2 additions and 8 deletions

View File

@ -6,13 +6,7 @@ Relais::Relais(uint gpio) : gpio{gpio} {
off();
}
void Relais::activate(bool active) {
if (active) {
gpio_pull_down(gpio);
} else {
gpio_pull_up(gpio);
}
}
void Relais::activate(bool active) { gpio_put(gpio, !active); }
void Relais::on() { activate(true); }