1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-24 16:55:29 +03:00
inav/src/sensors_sonar.c
Dominic Clifton 3bd4cd2ed2 Use slightly flatter directory structure since some developers did not
like too many folders.
Extracted code from some files into separate files to fit with the new
layout.
2014-04-08 22:07:37 +01:00

18 lines
244 B
C

#include "board.h"
#include "mw.h"
#ifdef SONAR
void Sonar_init(void)
{
hcsr04_init(sonar_rc78);
sensorsSet(SENSOR_SONAR);
sonarAlt = 0;
}
void Sonar_update(void)
{
hcsr04_get_distance(&sonarAlt);
}
#endif