[CCC DEV] Duhhhh! - problem with my servo fix.
Matt Jadud
matt at jadud.com
Mon Jan 31 23:17:03 GMT 2011
On Mon, Jan 31, 2011 at 17:57, Steve Pretty
<steve.g.pretty at btinternet.com> wrote:
> I do have some misgivings about relying on an I/O configuration port as a
> safe repository for state information! Probably just as many misgivings
> about holding such state information in a global variable!
I agree. Sadly, you eventually end up touching hardware, and things
become "unsafe." Our goal is to keep that as far down as is reasonably
possible.
We discussed putting all PWM configuration behind a long-running
process, much like the servo() interface. You would then have a
process that look like
pwm(10, cmd?)
perhaps, and you could communicate your hardware configuration to it
that way. The cmd? channel would become a PROTOCOL, and state could be
encapsulated in the long-running process that pwm() represented (much
like we do with the servo).
That's *one* thought. Not necessarily a good thought.
Another would be to just do some more abstraction in the library, and
call the "right" things based on which port/pin we were operating
on... essentially, a good-ol'-fashioned procedural decomposition. We
could capture the
That's a few quick thoughts. I have to make dinner and head to a rehearsal...
Cheers,
Matt
PS. What timezone are you in, anyway?
>
> What do you think?
>
>
> Steve
>
> _______________________________________________
> developers mailing list
> developers at concurrency.cc
> http://www.concurrency.cc/mailman/listinfo/developers
>
More information about the developers
mailing list