Created
January 24, 2018 04:23
-
-
Save azhaganandhan/277be80c301cf1f6fec8cf4e9ae0b37f to your computer and use it in GitHub Desktop.
Pressure convertion code Raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#define uint8_t unsigned char | |
#define uint16_t unsigned int | |
#define uint32_t unsigned int | |
int main() { | |
int x=33; | |
int y=125; | |
int z=151; | |
uint32_t SenAD; | |
float SenPDat; | |
SenAD = (uint32_t) ((x<<16) + (y<<8) + z); | |
SenPDat = (float) (SenAD-1677721) / 13421772 * 1000; | |
printf("SENAD= %f", SenAD); | |
printf("SENPDAT = %f", SenPDat); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment