Stabilized distance reading by using 15 sample median
This commit is contained in:
parent
140ade4ef6
commit
9d26ec5ab5
@ -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);
|
||||
|
Reference in New Issue
Block a user