Created
April 28, 2015 09:40
agri-typ-d-1a-mbed
This file contains hidden or 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
int iSen =0; | |
int iSen2 =0; | |
int iSen3 =0; | |
int iSen4 =0; | |
float fSen = inSen1; | |
float fSen2 = inSen2; | |
float fSen3 = inSen3; | |
float fSen4 = inSen4; | |
iSen = int(fSen * 1000); | |
iSen2 = int(fSen2 * 1000); | |
iSen3 = int(fSen3 * 1000); | |
iSen4 = int(fSen4 * 1000); | |
char buff[]="0000"; | |
string sPut="put_dat="; | |
sPut += conv_zeroStr(MC_ID ,4); | |
sprintf(buff, "%d", iSen); | |
sPut +=conv_zeroStr(buff ,4); | |
sprintf(buff, "%d", iSen2); | |
sPut +=conv_zeroStr(buff ,4); | |
sprintf(buff, "%d", iSen3); | |
sPut +=conv_zeroStr(buff ,4); | |
sprintf(buff, "%d", iSen4); | |
sPut +=conv_zeroStr(buff ,4); | |
mPc.printf("%s\n", sPut.c_str() ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment