mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-24 16:55:29 +03:00
like too many folders. Extracted code from some files into separate files to fit with the new layout.
18 lines
244 B
C
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
|