Skip to content

Instantly share code, notes, and snippets.

@crabtw
Created January 4, 2013 12:20
Show Gist options
  • Save crabtw/4452236 to your computer and use it in GitHub Desktop.
Save crabtw/4452236 to your computer and use it in GitHub Desktop.
float temp_decode(int16_t temp) {
int16_t hi = temp & 0xff00;
int16_t lo = temp & 0x00ff;
return (hi + lo) / 256.0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment