From: Andreas Klinger <ak@it-klinger.de>
To: "Zbyněk Kocur" <zbynek.kocur@fel.cvut.cz>
Cc: Jonathan Cameron <jic23@kernel.org>,
linux-iio@vger.kernel.org, knaack.h@gmx.de, lars@metafoo.de,
pmeerw@pmeerw.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: srf04: fix wrong limitation in distance measuring
Date: Mon, 9 Sep 2019 15:00:22 +0200 [thread overview]
Message-ID: <20190909130022.chcnvaltoyskw2of@arbad> (raw)
In-Reply-To: <7FD0B694-64B5-433D-B451-A0FD4DF32AED@fel.cvut.cz>
Hi Zbyněk,
thanks a lot for testing and sharing your results with us.
> I do not know how to do this in the development of drivers, whether it makes
> sense to put a filter directly into the driver or at least pull the maximum
> distance parameter as a variable?
In this case one should read several times, remove spikes and calculate the
average. This sounds to me as task for the userspace not for the driver.
Regards,
Andreas
Zbyněk Kocur <zbynek.kocur@fel.cvut.cz> schrieb am Mo, 09. Sep 08:53:
> Hi Andreas,
>
> I'm so sorry for the delay. I was working on another project now, and I wasn't entirely devoted to this. I looked at it at the weekend and the modified code is working. I have only tested OpenWRT in build - r10204-38b22b1, kernel 4.14.125. I do not expect complications on other platforms.
>
> I tried it on several sensors. I was primarily interested in JSN-SR04T (https://www.makerguides.com/jsn-sr04t-arduino-tutorial/). I have also verified other designs (https://randomnerdtutorials.com/complete-guide-for-ultrasonic-sensor-hc-sr04/).
>
> It generally works. Relatively accurate for the area up to 2.5 m. However, if the distance is longer, it starts to fizz, depending on the sensor design. It is a property of used HW and its construction.
>
> I do not know how to do this in the development of drivers, whether it makes sense to put a filter directly into the driver or at least pull the maximum distance parameter as a variable?
>
> Anyway, the change made works.
>
> Zbynek
> ---
> email: zbynek.kocur@fel.cvut.cz
> phone: +420 224 354 054
> web: http://www.fel.cvut.cz
> Department of Telecommunications Engineering
> Faculty of Electrical Engineering
>
> > On 7 Sep 2019, at 11:46, Andreas Klinger <ak@it-klinger.de> wrote:
> >
> > Hi Zbynek,
> >
> > do you have any feedback for us?
> >
> > Thank you,
> >
> > Andreas
> >
> >
> > Zbyněk Kocur <zbynek.kocur@fel.cvut.cz> schrieb am Mi, 26. Jun 21:50:
> >> Thank you, i will write a feedback after testing.
> >>
> >>
> >> Zbynek
> >> ---
> >> email: zbynek.kocur@fel.cvut.cz
> >> phone: +420 224 354 054
> >> web: http://www.fel.cvut.cz
> >> Department of Telecommunications Engineering
> >> Faculty of Electrical Engineering
> >>
> >>> On 26 Jun 2019, at 21:49, Jonathan Cameron <jic23@kernel.org> wrote:
> >>>
> >>> No rush, it's a clear fix anyway so we can queue this up
> >>> in the rc phase of the next kernel cycle!
> >>
> >
> > --
> > Andreas Klinger
> > Grabenreith 27
> > 84508 Burgkirchen
> > +49 8623 919966
> > ak@it-klinger.de
> > www.it-klinger.de
> > www.grabenreith.de
>
--
Andreas Klinger
Grabenreith 27
84508 Burgkirchen
+49 8623 919966
ak@it-klinger.de
www.it-klinger.de
www.grabenreith.de
prev parent reply other threads:[~2019-09-09 13:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-23 12:29 [PATCH] iio: srf04: fix wrong limitation in distance measuring Andreas Klinger
2019-06-26 18:21 ` Jonathan Cameron
[not found] ` <03D5EE82-D6C7-4A03-9404-45B48F1EF5B6@fel.cvut.cz>
2019-06-26 19:49 ` Jonathan Cameron
2019-06-26 19:50 ` Zbyněk Kocur
2019-09-07 9:46 ` Andreas Klinger
2019-09-09 6:53 ` Zbyněk Kocur
2019-09-09 13:00 ` Andreas Klinger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190909130022.chcnvaltoyskw2of@arbad \
--to=ak@it-klinger.de \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=zbynek.kocur@fel.cvut.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).