Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: Request for help in method naming

by Anonymous Monk
on May 18, 2017 at 18:36 UTC ( #1190554=note: print w/replies, xml ) Need Help??

in reply to Request for help in method naming

Uh... Maybe have two different poll() methods, one that returns a metric set, other for imperial? You can return an object with the measurements at a specific point in time, while the gps object has the device config and parameters.

Replies are listed 'Best First'.
Re^2: Request for help in method naming
by stevieb (Abbot) on May 18, 2017 at 19:08 UTC

    That's a decent approach, but I'm thinking more along the lines of something so that the values themselves can be sent in, so the methods can operate outside of the core data storage.

    This way, parts of this module can be used without having to actually generate or used stored organized data to do some translations.

    This would definitely work though, and I hadn't thought about such an approach. It would be trivial to have poll() accept another parameter, and on each call, even an interrupt via a button could set this param (or unset it).

    I appreciate the feedback. I will keep it in mind and play around for sure.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1190554]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2018-05-21 00:19 GMT
Find Nodes?
    Voting Booth?