mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:32:45 +01:00
drivers/sfr04: Use uncrustify
This commit is contained in:
parent
caa1ad822d
commit
5a5c8507d4
@ -32,10 +32,12 @@ static void _cb(void *arg)
|
||||
uint32_t t = xtimer_now_usec();
|
||||
|
||||
srf04_t *dev = (srf04_t *)arg;
|
||||
|
||||
if (dev->distance > SRF04_ERR_MEASURING) {
|
||||
dev->distance = SRF04_ERR_MEASURING;
|
||||
dev->time = t;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
gpio_irq_disable(dev->p.echo);
|
||||
dev->distance = (t - dev->time);
|
||||
}
|
||||
|
@ -39,7 +39,8 @@ int main(void)
|
||||
int distance = srf04_get_distance(&dev);
|
||||
if (distance < SRF04_OK) {
|
||||
puts("Error: no valid data available");
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
printf("D: %d mm\n", distance);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user