adafruit / Adafruit_BMP085_Unified

Unified sensor driver for Adafruit's BMP085 & BMP180 breakouts
94 stars 60 forks source link

add timestamp to sensor reading #4

Closed edorphy closed 10 years ago

edorphy commented 10 years ago

I noticed that the timestamp is being set to zero inside the get event method. For my quadcopter I'll eventually be using this sensor and need a timestamp, its a quick one line fix. Is it set to zero by design or by default and not updated yet? .cpp line 420

ladyada commented 10 years ago

We borrowed the structure from android, but we dont have an RTC on the Arduino by default so we don't have that do anything. you can assign it if you have an RTC but we can't assume that all our users will, if that makes sense :)

microbuilder commented 10 years ago

You can also try setting it to millis() which might work for you, but indeed we left this blank assume people might want to fill it in with a different value from an RTC or some other source.

edorphy commented 10 years ago

Kevin, Thanks for your quick response.

An implementation of millis or micros was exactly what I was thinking. Good to know it was left zero by design.

Keep up the amazing work, adafruit is awesome!

Regards, Eric

On Mar 6, 2014, at 1:13 PM, Kevin Townsend notifications@github.com wrote:

You can also try setting it to millis() which might work for you, but indeed we left this blank assume people might want to fill it in with a different value from an RTC or some other source.

— Reply to this email directly or view it on GitHub.