Skip to content

Instantly share code, notes, and snippets.

@cupakromer
Last active January 1, 2016 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cupakromer/8201917 to your computer and use it in GitHub Desktop.
Save cupakromer/8201917 to your computer and use it in GitHub Desktop.
Radius iBeacon offline mode minor decoder
def decode_minor(minor)
day = minor >> 11
hour = (minor >> 6) & 0b11111
min = minor & 0b111111
"#{day} #{hour}:#{min} UTC"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment