Stabilized distance reading by using 15 sample median

pull/6/head
mandlm 2017-10-16 09:14:45 +02:00
parent 140ade4ef6
commit 9d26ec5ab5
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ void DistanceThread::run()
while (true)
{
std::vector<double> values;
for (int i = 0; i < 5; ++i)
for (int i = 0; i < 15; ++i)
{
digitalWrite(m_triggerPin, HIGH);
delayMicroseconds(10);