예제 #1
0
bool CPasswordDialog::OnButtonClicked(int buttonID, HWND buttonHWND)
{
  if (buttonID == IDX_PASSWORD_SHOW)
  {
    ReadControls();
    SetTextSpec();
    return true;
  }
  return CDialog::OnButtonClicked(buttonID, buttonHWND);
}
int main(int argc, char** argv)
{
    int i = 0;
    int j = 0;
    int test = 0;
    // Implement communication:
    printf("Initializing Wireless Communication\n");
    initComm();

    printf("Reading Controls\n");
    // Read necessary robot instructions:
    Control *robot_2;
    unsigned char filename[128];
    sprintf(filename, "%s", "/home/jarvis/Dropbox/ccode/PrescriptedTrepPlay/TrajectoryData.txt");
    robot_2 = ReadControls(filename, 2);
    
    longdelay.tv_sec = 0.0;
    longdelay.tv_nsec = robot_2->DT*1000000000;
	
    printf("Beginning movement execution\n");
    // Now we begin a loop where we run through each entry of the velocity
    // arrays and send out the info contained in each one
    i = 0;
 
    while(1)
    {
	if(kbhit() && KeyboardInterpreter())
	    break;
	if(i < robot_2->num && exit_flag == 0)
	{
	    printf("%5.2f\n",100.0*i/robot_2->num);
	    sendArrayEntry(i, robot_2);
	    if(nanosleep(&longdelay,&delayrem)) printf("Nanosleep Error\n");
	}
	else
	{
	    stopRobots();
	    if(j == 0) printf("Stopping Robots!\n");
	    j = 1;
//	    assert(0);
	}
	i++;
    }

    close(fd);

    printf("Program Complete!\n");
    return 0;
}
예제 #3
0
void CPasswordDialog::OnOK()
{
  ReadControls();
  CModalDialog::OnOK();
}
예제 #4
0
파일: config.cpp 프로젝트: antydoom/citra
void Config::Reload() {
    ReadControls();
    ReadCore();
    ReadData();
    ReadMiscellaneous();
}