shiftdsm / Galavanting-Gnome

0 stars 1 forks source link

Save Battery Level #59

Closed mgerst closed 5 years ago

mgerst commented 5 years ago

Either in the location endpoint or another endpoint, we should take in the current battery level of the gnome. This will help with debugging and it might be cool to see the battery over time.

tegandbiscuits commented 5 years ago

Do you think the backend should calculate the battery percentage, or the arduino?

Also about seeing battery over time, (as a separate task) we could use something like DarkSky to get the weather, and associate how sunny it is.

mgerst commented 5 years ago

The battery level is given as a percentage from the FONA, so no calculation needed.

I like the weather idea.

tegandbiscuits commented 5 years ago

Oh ok, I was under a different impression.

mgerst commented 5 years ago

Yeah, I was happily surprised when I found that out. Made things a lot easier. Although, now that I think about it, I'm not sure how it can know what the percentage is. I'll look into that, we may have to tell it what size the battery is to make it accurate.

tegandbiscuits commented 5 years ago

Maybe the FONA is able to get the max charge (not sure if that's the right wording) from the battery?

I made this issue for the weather #61.

tegandbiscuits commented 5 years ago

What format do you get the battery in? I assume it's not a string that can says 100%, but is it a decimal number 0-100, or a decimal 0-1, or something else?

mgerst commented 5 years ago

You know, that's a great question. I'm treating it as a double, but reading it as a uint16. Either way it's 0-100.

mgerst commented 5 years ago

Ok, looked at what is actually being sent. It's an integer from 0-100.