예제 #1
0
파일: VDIP.cpp 프로젝트: ChapResearch/ChapR
void VDIP::processNXT(portConfig *portConfigBuffer)
{
	  char *name;
	  char *btAddress;
	  long	freeMemory;
          extern BT bt;
          if (myEEPROM.getResetStatus() == (byte) 0){
	    if(nxtQueryDevice(this,portConfigBuffer->usbDev,&name,&btAddress,&freeMemory)){
//	      Serial.print("btAddress: \"");
//	      Serial.print(btAddress);
//	      Serial.print("\"");
              bt.setRemoteAddress(btAddress);
              delay(100);
//	      Serial.print(myEEPROM.getResetStatus());
              myEEPROM.setResetStatus(1); // increments the "status" so that the ChapR knows it has been reset
//	      Serial.print(myEEPROM.getResetStatus());

              delay(1000);
              software_Reset();
            }
          }    
}
예제 #2
0
파일: VDIP.cpp 프로젝트: ChapResearch/ChapR
void VDIP::ejectNXT()
{  
     myEEPROM.setResetStatus(0);
}