POV-Ray : Newsgroups : povray.off-topic : c++ template types for function : Re: c++ template types for function Server Time
28 Sep 2022 04:57:35 EDT (-0400)
  Re: c++ template types for function  
From: Bald Eagle
Date: 30 Apr 2020 19:15:00
Message: <web.5eab5accce0a4398fb0b41570@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:

> this looks so wrong.  if I read your intent correctly, in C, that would need to
> be something like:

Yeah, but it's code copied right out of the functioning .h file, so...

> seems to me that if the sensors are of the same type, you'd only need so many
> instances, if they differ, I guess some sensor parent class + per type classes
> inheriting from that.  (usual 'no speak c++' disclaimer)

I mean, if there's a way to keep all of the functions mostly the way they are
and somehow get them to work on a sensor argument passed to them...

> can't really comment on the remaining question.  I would have thoughr though
> that there are enough arduino projects on the web to .. analyse and peruse.

I would have thought so too, but I've spent several fruitless hours searching
for exactly that and ... no joy.  You'd think that SparkFun or Texas Instruments
would have _some_ sort of information on how to hook up multiple sensors, but
that seems to be conspicuously absent.

Let the hacking commence!   >:)

Post a reply to this message

Copyright 2003-2021 Persistence of Vision Raytracer Pty. Ltd.