For Hepta-Sat Lite
Diff: HeptaXbee.cpp
- Revision:
- 12:94abebd3d020
- Parent:
- 11:a5a0ab9949f3
- Child:
- 13:59679840fb53
--- a/HeptaXbee.cpp Tue Dec 18 13:10:15 2018 +0000 +++ b/HeptaXbee.cpp Wed Aug 21 11:18:56 2019 +0000 @@ -32,7 +32,7 @@ //xbee.printf("Xbeedata= %d,%d",rcmd,cmdflag); } -//*gyro×3 = A,B,C *Accel×3 = D,E,F *magnetic×3 = G,H,I *latitude = J *longitude = K *altitude = L *battery = M *temperature = N +//*gyro×3 = A,B,C *Accel×3 = D,E,F *magnetic×3 = G,H,I *latitude = J *longitude = K *altitude = L *battery = M *temperature = N void HeptaXbee::xbee_transmit(char dataA[],char dataB[],char dataC[],char dataD[],char dataE[], char dataF[],char dataG[],char dataH[],char dataI[],char dataJ[], char dataK[],char dataL[],char dataM[],char dataN[]) @@ -122,14 +122,14 @@ sprintf( flame, "%02X", output_num); // transmit data //for(int i = 0;i<2;i++){ - // xbee.putc(flame[i]);//frame length - // } + // xbee.putc(flame[i]);//frame length + // } for(ii=0; ii<output_num; ii++) { xbee.putc(OutputData[ii]);//data } - for(int i = 0;i<2;i++){ + for(int i = 0; i<2; i++) { xbee.putc(check_sum[i]); - } + } xbee.putc(0x0a);//endcode } void HeptaXbee::puts( char *s ) @@ -137,6 +137,10 @@ while ( char c = *s++ ) xbee.putc( c ); } +void HeptaXbee::scanf(char *format, ... ) +{ + xbee.scanf(format); +} void HeptaXbee::printf( char *format, ... ) { char s[ 100 ];