Fixed logic error in relais
This commit is contained in:
parent
bde19fd2b7
commit
d6ea24685b
2 changed files with 2 additions and 8 deletions
|
@ -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); }
|
||||
|
||||
|
|
Loading…
Reference in a new issue