Hepta_Xbee_Library
Dependents: HEPTA_Xbee HEPTA2_XBEE HEPTA2_assembly_0720 HEPTA2_ALL ... more
Diff: HeptaXbee.cpp
- Revision:
- 2:031c35ada7e6
- Parent:
- 1:c31e4a5db17c
--- a/HeptaXbee.cpp Fri Jul 21 10:36:20 2017 +0000 +++ b/HeptaXbee.cpp Sat Aug 05 13:36:13 2017 +0000 @@ -27,8 +27,8 @@ } void HeptaXbee::xbee_transmit(char* output_data,size_t output_n, - char data1[],char data2[],char data3[],char data4[],char data5[],char data6[],char data7[],char data8[],char data9[],char data10[],char data11[],char data12[],char data13[], - int n1,int n2,int n3,int n4,int n5,int n6,int n7,int n8,int n9,int n10,int n11,int n12,int n13,int data_num) + char data1[],char data2[],char data3[],char data4[],char data5[],char data6[],char data7[],char data8[],char data9[],char data10[],char data11[],char data12[],char data13[],char data14[], + int n1,int n2,int n3,int n4,int n5,int n6,int n7,int n8,int n9,int n10,int n11,int n12,int n13,int n14,int data_num) { int N=0,i=0,ii,jj=0; if(data_num>=1){ @@ -108,17 +108,24 @@ for(i = 0; i <= n13-1; i++){ output_data[N+i] = data13[i]; } + N=N+i; + } + if(data_num>=14){ + for(i = 0; i <= n14-1; i++){ + output_data[N+i] = data14[i]; + } } for(ii=0;ii<output_n;ii++){ xbee.putc(output_data[ii]); + /* jj++; if(jj==2) { xbee.putc(0x20); jj=0; - } + } */ } - xbee.putc(0x0a); + xbee.printf("\n"); } void HeptaXbee::puts( char *s ) { while ( char c = *s++ ) @@ -133,4 +140,9 @@ va_end( args ); xbee.puts( s ); -} \ No newline at end of file +} +char HeptaXbee::getc(){ + char chara; + chara = xbee.getc(); + return chara; + } \ No newline at end of file