Fix return value signedness

This commit is contained in:
Rihards Skuja 2018-01-02 14:46:33 +02:00
parent 9d0bb921b3
commit 8104fbbad0
No known key found for this signature in database
GPG Key ID: 53FA13A3F7F8571B
2 changed files with 2 additions and 2 deletions

View File

@ -40,6 +40,6 @@
void init_sonar(void);
void trigger_sonar(void);
unsigned int read_sonar(void);
int read_sonar(void);
#endif /* SONAR_H */

View File

@ -28,7 +28,7 @@ ISR(TIMER1_OVF_vect)
TCNT1 = 0;
}
unsigned int read_sonar()
int read_sonar()
{
int dist_in_cm = 0;
init_sonar();