Changeset 817
- Timestamp:
- 08/13/08 13:08:25 (3 months ago)
- Files:
-
- 1 modified
-
firmware/trunk/libraries/xbee/xbee.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
firmware/trunk/libraries/xbee/xbee.c
r812 r817 225 225 do 226 226 { 227 if( Serial_GetErrors( 0, 0, 0 ) ) 228 Serial_ClearErrors(); 229 227 Serial_ClearErrors(); 230 228 while( Serial_GetReadable( ) ) 231 229 { … … 233 231 if( newChar == -1 ) 234 232 break; 235 236 // should really have a watchdog to reset the parser if it goes haywire237 233 238 234 switch( packet->rxState ) … … 391 387 { 392 388 char buf[50]; 393 s nprintf( buf, 50, "+++" ); // enter command mode389 sprintf( buf, "+++" ); // enter command mode 394 390 Serial_Write( (uchar*)buf, strlen(buf), 0 ); 395 391 Sleep( 1025 ); // have to wait one second after +++ to actually get set to receive in AT mode 396 s nprintf( buf, 50, "ATAP %x,CN\r", 1); // turn API mode on, and leave command mode392 sprintf( buf, "ATAP1,CN\r" ); // turn API mode on, and leave command mode 397 393 Serial_Write( (uchar*)buf, strlen(buf), 0 ); 394 Sleep(50); 395 Serial_Flush(); // rip the OKs out of there 398 396 } 399 397 else
