Skip to content

Commit

Permalink
squash: reflect comments RIOT-OS#2
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyungsin committed Jun 20, 2018
1 parent 69ed4d7 commit 1b0efd6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions drivers/include/pir.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include "kernel_types.h"
#include "periph/gpio.h"
#include "stdbool.h"

#ifdef __cplusplus
extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion drivers/pir/pir.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ int pir_init(pir_t *dev, const pir_params_t *params)

pir_event_t pir_get_status(const pir_t *dev)
{
return ((gpio_read(dev->p.gpio) == dev->p.active_high) ?
return (((gpio_read(dev->p.gpio) > 0) == dev->p.active_high) ?
PIR_STATUS_ACTIVE : PIR_STATUS_INACTIVE);
}

Expand Down

0 comments on commit 1b0efd6

Please sign in to comment.