亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? birdmain.c

?? 一個C語言寫的讀入位置跟蹤器數(shù)據(jù)的源程序
?? C
?? 第 1 頁 / 共 2 頁
字號:
	    case 1:             /* Bird Output Test */
		birdoutputtest();
		break;

	    case 2:             /* Bird Echo Test */
		birdechotest();
		break;

	    case 3:             /* Host Data Read Test */
		hostreadtest();
		break;

	    case 4:             /* Host Data Read Block Test */
		hostreadblocktest();
		break;
	}
    }
    return(TRUE);
}

int birdoutputtest()
{
    short i;
    short rxchar;
    unsigned char charbuf[5];

    /*
       Display data read from the Bird until a key is hit
    */
    while (!ckkbhit())
    {
	/*
	    Get the 4 byte response.. first, clear the buffer
	*/
	clear_rx();
	for (i=0; i < 4 ; i++)
	{
	    rxchar = waitforchar();
	    if (rxchar < 0)
	    {
		printf("** ERROR ** could not read data from the Bird\n\r");
		hitkeycontinue();
		return(FALSE);
	    }

	    /*
	       Store the char
	    */
	    charbuf[i] = rxchar;
	}

	/*
	   Display the String to the console..first append the NULL termination
	*/
	charbuf[4] = 0;
	printf("%s",charbuf);
    }
    clearkey();
    return(TRUE);
}


int birdechotest()
{
    short rxchar;
    unsigned char txchar;
    short echochar;

    /*
       Allow the user to type any character and the Bird will echo the
       character ...ESC will end the Echo
    */
    printf("\n\rEnter Character to echo from the keyboard, <ESC> to quit\n\n\r");

    while((echochar = getkey()) != ESC)
    {
	/*
	    Display the character input from the keypad
	*/
	putchar(echochar);

	/*
	   Send the input char to the Bird
	*/
	txchar = echochar;
	send_serial_cmd(&txchar,1);

	/*
	   Get the 1 received character .. hopefully
	*/
	rxchar = waitforchar();
	if (rxchar < 0)
	{
	    printf("** ERROR ** could not read data from the Bird\n\r");
	    hitkeycontinue();
	    return(FALSE);
	}

	/*
	    Display the character
	*/
	putchar(rxchar);
    }

    return(TRUE);
}

int hostreadtest()
{
    short rxchar;

    /*
       Allow the user to type any character and the Bird
       will output numbers 0 - 255 ...ESC will end the Test
    */
    printf("\n\rHit any key for next Output Char, <ESC> to quit\n\n\r");

    clear_rx();
    while((getkey()) != ESC)
    {
	/*
	   Send the char to the Bird
	*/
	send_serial_cmd((unsigned char *)" ",1);

	/*
	   Get the 1 received character .. hopefully
	*/
	rxchar = waitforchar();
	if (rxchar < 0)
	{
	    printf("** ERROR ** could not read data from the Bird\n\r");
	    hitkeycontinue();
	    return(FALSE);
	}

	/*
	    Display the character as a decimal number on the screen
	*/
	printf("Bird Output: %d\n\r", rxchar);
    }

    return(TRUE);
}

int hostreadblocktest()
{
    short i;
    short rxchar[256];

    /*
       Allow the user to type any character and the Bird
       will output numbers 0 - 255 ...ESC will end the Test
    */
    printf("\n\rHit any key for next Output Block, <ESC> to quit\n\n\r");

    clear_rx();
    while((getkey()) != ESC)
    {
	/*
	   Send the char to the Bird
	*/
	send_serial_cmd((unsigned char *)" ",1);

	/*
	   Get the 256 received characters
	*/
	for (i=0; i<256 ; i++)
	{
	    rxchar[i] = waitforchar();
	    if (rxchar[i] < 0)
	    {
		printf("** ERROR ** could not read data from the Bird\n\r");
		hitkeycontinue();
		return(FALSE);
	    }
	}

	/*
	    Display the block as a decimal numbers on the screen
	*/
	printf("\n\n\rBird Output: %d", rxchar[0]);
	for(i=1; i<256; i++)
	    printf(",%d", rxchar[i]);
    }

    return(TRUE);
}

/*
    nextmastercmd       - Next Master Command

    Prototype in:       birdmain.c

    Parameters Passed:  void

    Return Value:       TRUE if command sent OK
			FALSE if command could not be sent
			ESCSEL if the user selected ESC

    Remarks:
*/
int nextmastercmd()
{
    unsigned char rs232cmd;
    int nextmaster;
    char * nextmasterques = "\n\rEnter the NEXT Master address (1 - 14): ";

    printf ("%s",nextmasterques);
    while ((nextmaster = getnumber()) != ESC_SEL)
    {
	if ((nextmaster > 0) && (nextmaster < 15))
	{
	    rs232cmd = (unsigned char) nextmaster + '0';

	    if (send_serial_cmd(&rs232cmd,1) != 1)
	    {
		printf("** ERROR ** could not send the NEXTMASTER command\n\r");
		hitkeycontinue();
		return(FALSE);
	    }
	    else
	    {
		return(TRUE);
	    }
	}
	else
	{
	    printf("** ERROR ** invalid address\n\r");
	    printf ("%s",nextmasterques);
	}
    }
    return(TRUE);
}


/*
    nextxmtrcmd         - Next Transmitter Command

    Prototype in:       birdmain.c

    Parameters Passed:  void

    Return Value:       TRUE if command sent OK
			FALSE if command could not be sent
			ESCSEL if the user selected ESC

    Remarks:
*/
int nextxmtrcmd()
{
    unsigned char rs232cmd[2];
    int nextxmtraddr;
    int nextxmtrnum = 0;
    char * nextxmtrques1 = "\n\rEnter the NEXT TRANSMITTER address (1-14): ";
    char * nextxmtrques2 = "\n\rEnter the NEXT TRANSMITTER number (0-3): ";

    /*
	Get the System Status because we will need to which device
	has a transmitter
    */
    if (!getsystemstatus())
	return(FALSE);

    printf ("%s",nextxmtrques1);
    while ((nextxmtraddr = getnumber()) != ESC_SEL)
    {
	if ((nextxmtraddr > 0) && (nextxmtraddr < 15))
	{
	    if (fbbsystemstatus[nextxmtraddr] & 0x0f)
	    {
		rs232cmd[0] = '0';
		rs232cmd[1] = (unsigned char) nextxmtraddr << 4;
		break;
	    }
	    else
	    {
		printf("** ERROR ** transmitter not available at that address\n\r");
		printf ("%s",nextxmtrques1);
	    }
	}
	else
	{
	    printf("** ERROR ** invalid address\n\r");
	    printf ("%s",nextxmtrques1);
	}
    }

    if (nextxmtraddr == ESC_SEL)
	return(ESC_SEL);

    /*
	Only ask for the transmitter number if the device is an ERC
    */
    if (fbbsystemstatus[nextxmtraddr] & 0x10)
    {
	printf ("%s",nextxmtrques2);
	while ((nextxmtrnum = getnumber()) != ESC_SEL)
	{
	    if ((nextxmtrnum >= 0) && (nextxmtrnum <= 3))
	    {
		if (!(fbbsystemstatus[nextxmtraddr] & (0x1 << nextxmtrnum)))
		{
		    printf("** ERROR ** ERT selection not available at that address\n\r");
		    printf ("%s",nextxmtrques2);
		}
		else
		{
		    /*
			Else the Transmitter number OK so load it
		    */
		    rs232cmd[1] |= (unsigned char) nextxmtrnum;
		    break;
		}
	    }
	    else
	    {
		printf("** ERROR ** invalid xmtr number\n\r");
		printf ("%s",nextxmtrques2);
	    }
	}
    }

    if (nextxmtrnum == ESC_SEL)
	return(ESC_SEL);

    if (send_serial_cmd(rs232cmd,2) != 2)
    {
	printf("** ERROR ** could not send the NEXT XMTR command\n\r");
	hitkeycontinue();
	return(FALSE);
    }

    printf("..NEXT XMTR command sent\n\r");
    hitkeycontinue();
    return(TRUE);
}

/*
    setxmtrtype         SET XMTR TYPE

    Prototype in:       birdmain.c

    Parameters Passed:  void

    Return Value:       ESC_SEL if the user selected ESC

    Remarks:            sets the posk global to POSK36 if Flock is 
			selected or POSK144 if the ER Controller is
			selected
*/
int setxmtrtype()
{
    short xmtrtype;
    static char * xmtrtype_menuptr [] =
		 {"Select Transmitter Type:",
		  "Short Range Transmitter",
		  "Extended Range Transmitter"};

    /*
       Let the user select Transmitter type
    */
    if ((xmtrtype = sendmenu(xmtrtype_menuptr,2)) == ESC_SEL)
    return(ESC_SEL);

    /*
       Setup Scaling for 36" if choice 0
    */
    if (xmtrtype == 0)
       posk = POSK36;

    /*
       Setup Scaling for 144" if choice 1
    */
    if (xmtrtype == 1)
       posk = POSK144;

    return(TRUE);
}

/*
    get_output_mode     -   Get Output Mode

    Prototype in:       birdmain.h

    Parameters Passed:  void

    Return Value:       outputmode = POINT, CONTINUOUS, or STREAM
			if mode is selected or ESC_SEL if ESC is selected

    Remarks:            prompts the user to enter the outputmode from the
			bird.
*/
int get_output_mode()
{
    int mode;
    short menuselects;

    static char * outputmode_menuptr [] =
		   {"Data Output Modes:",
		    "Point Mode",
		    "Continuous Point Mode",
		     "Stream Mode"};

    /*
	Only POINT or Continuous mode when using Multi devices in RS232
	to FBB mode and not in the Group Mode
    */
    menuselects = 3;
    if ((displaymultidataflg) && (!fbbgroupdataflg))
	menuselects = 2;

    /*
	Put up the Menu and get the selection
    */
    if ((mode = sendmenu(outputmode_menuptr,menuselects)) == ESC_SEL)
	return(ESC_SEL);

    /*
	Close the Data file if already open
    */
    if (datafilestream)
	fclose(datafilestream);

    /*
	Ask the User if they want to save data to a File
    */
    if (askyesno("\nDo you want to save the data to an ASCII file"))
    {
	printf("\n\r\n\rCurrent data file name is <%s>\n\r",datafilename);
	if (askyesno("...Do you want to change the file name"))
	{
	    printf("\n\rEnter the Filename: ");
	    scanf("%s",datafilename);
	}

	if ((datafilestream = fopen(datafilename,"wt")) == NULL)
	{
	    printf("** ERROR ** could not open the data file\n\r");
	    hitkeycontinue();
	}
    }

    printf("\n\r");

    return(mode); /* return the value selected */
}


/*

    serialinit          -   Serial Port Initialization

    Prototype in:       birdmain.h

    Parameters Passed:  void

    Return Value:       TRUE if successful
			FALSE if unsuccessful

    Remarks:            Routine prompts the user for the serial port
			configuration parameters of COM1 or COM2 and
			tries to configure the port via configserialport()
*/
int serialinit()
{
    short menusel;
    static char * serialhdr =
"****************************************************************************\n\r\
* ASCENSION TECHNOLOGY CORPORATION - Serial Port Configuration             *\n\r\
****************************************************************************\n\r\n";

    static char * serialmenu[] =
	      {"Serial Port Options:",
	       "No Change",
	       "115200",
	       "57600",
	       "38400",
	       "19200",
	       "9600",
	       "4800",
	       "2400",
	       "COM1",
	       "COM2"};


    /*
	Clear the Screen and Put up a Header
    */
    CLEARSCREEN;
    sendmenuhdr(serialhdr);

    /*
	Save the Serial configuration, if not already saved
    */
    if (!serialconfigsaved)
    {
	if (!saveserialconfig())
	{
	    printf("** NOTE ** could not save current serial port configuration\n\r\n\r");
	    hitkeycontinue();
	}
	else
	{
	    serialconfigsaved = TRUE;
	}
    }

    /*
	Query the User for the Serial Port configuration
    */
    do
    {
	/*
	    Display Current Configuration
	*/
	printf("\n\rCurrent Serial Port Configuration: \n\r\t %s at %ld Baud\n\r",
	    sys_com_port[comport],baud);

	/*
	    Get menu selection
	*/
	if ((menusel = sendmenu(serialmenu,10)) <= 0)   /* ESC or no change */
	{

	    /*
		Configure the Serial Port Hardware
	    */
	    if (!configserialport())
	    {
		printf("** Error Initializing Serial Port **\n\r");
		hitkeycontinue();
		return(FALSE);
	    }
	    return(TRUE);                       /* all set...go home */
	}

	if (menusel < 8)                        /* if Baud rate change */
	{
	    /*
		Store the New Baud Rate
	    */
	    baud = baudratetable[menusel-1];

	    /*
		Store the New Baud in Bits ..get from the table which
		was created using the sgtty.h OR termio.h system
		include file
	    */
	    if ((baudspeedbits = baudspeedbittable[menusel-1]) == -1)
	    {
	       printf("\n\r** ERROR ** baud rate not supported\n\r");
	       baud = 9600L;   /* setup baud to legal value */
	       hitkeycontinue();
	    }
	}

	/*
	    Must be a Com Port Change
	*/
	if (menusel == 8)                       /* if Com 1 port Change */
	{
	    restoreserialconfig();
	    comport = COM1;                     /* set the new port # */
	    if (!saveserialconfig())
		return(FALSE);
	}

	if (menusel == 9)                       /* if Com 2 port Change */
	{
	    restoreserialconfig();
	    comport = COM2;                     /* set the new port # */
	    if (!saveserialconfig())
		return(FALSE);
	}
    }
    while(TRUE);
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一二三区在线观看| 风间由美一区二区三区在线观看| 91蜜桃传媒精品久久久一区二区| 国产网站一区二区| 成a人片国产精品| 亚洲精品高清视频在线观看| 色综合一区二区| 亚洲成人777| 日韩一区二区三区观看| 精品亚洲成av人在线观看| 国产亚洲精品免费| 91小视频在线免费看| 欧美一卡二卡在线| 337p亚洲精品色噜噜噜| 精品第一国产综合精品aⅴ| 久久久不卡网国产精品二区| 蜜桃视频免费观看一区| 日韩主播视频在线| 成人免费视频一区| 色94色欧美sute亚洲13| 日韩西西人体444www| 亚洲欧洲精品一区二区精品久久久 | 日韩黄色免费电影| 国产成人综合视频| 日韩视频永久免费| 欧美一区二区私人影院日本| 日韩欧美国产一二三区| 欧美日韩一区二区三区四区| 欧美日韩一区二区三区在线看| 黄色日韩网站视频| 日韩中文欧美在线| 国产成人三级在线观看| 亚洲欧洲综合另类| 欧美人动与zoxxxx乱| 精品无码三级在线观看视频| 日韩一级视频免费观看在线| 精品一区二区三区不卡| 国产日韩精品一区| 日韩欧美在线一区二区三区| 欧美一级一级性生活免费录像| 精品理论电影在线| 国产清纯在线一区二区www| 最新日韩av在线| 中文成人av在线| 日本在线不卡一区| av日韩在线网站| 精品精品欲导航| 久久久精品免费网站| 一区二区三区四区av| zzijzzij亚洲日本少妇熟睡| 麻豆91精品91久久久的内涵| 久久99久久99小草精品免视看| 91亚洲男人天堂| 日本午夜一本久久久综合| 欧美极品aⅴ影院| 成人小视频免费在线观看| 樱花影视一区二区| 91国偷自产一区二区开放时间| 免费观看一级欧美片| 国产精品国产三级国产普通话三级 | 欧美一区二区在线免费播放 | 一区二区高清在线| 久久综合色综合88| 欧美精品vⅰdeose4hd| 成人国产电影网| 男男gaygay亚洲| 一区二区三区欧美激情| 久久精品人人做人人综合| 欧美精品免费视频| 99re亚洲国产精品| 国产不卡视频在线播放| 久久99精品视频| 日韩成人一区二区| 中文字幕在线不卡国产视频| 欧美高清你懂得| 一本久久综合亚洲鲁鲁五月天| 狠狠狠色丁香婷婷综合激情| 五月天激情小说综合| 亚洲精品伦理在线| 国产精品视频在线看| 久久久.com| 2024国产精品| 欧美三级电影在线观看| 日韩欧美综合在线| 精一区二区三区| 日韩中文字幕亚洲一区二区va在线 | 亚洲精品国产无天堂网2021| 日韩黄色小视频| 26uuu色噜噜精品一区| 欧美日韩在线免费视频| 成人免费视频一区二区| 国内成人精品2018免费看| 一区二区三区四区亚洲| 久久―日本道色综合久久| 色婷婷综合久久| 韩国欧美国产1区| 中文字幕一区二区在线播放 | 99国产精品国产精品毛片| 一区二区三区在线视频免费| 久久亚洲一级片| 欧美日韩亚洲高清一区二区| 91老师片黄在线观看| 久久九九久久九九| 狠狠色综合日日| 色丁香久综合在线久综合在线观看| 中文字幕日本乱码精品影院| 日韩视频123| 97精品久久久午夜一区二区三区 | 欧美一区二区三区视频免费播放| 精品国产免费视频| 欧美日韩免费观看一区二区三区| 91免费国产在线| 高清国产一区二区三区| 成人免费视频app| 青青草伊人久久| 国产一区二区三区精品欧美日韩一区二区三区| 久久精品国产精品亚洲综合| 成人一区在线观看| 97se亚洲国产综合在线| 自拍偷拍欧美激情| 欧美极品美女视频| 亚洲男人的天堂在线观看| 亚洲欧美在线观看| 欧美aⅴ一区二区三区视频| 亚洲伦理在线免费看| 日韩成人一区二区| 久久99日本精品| 国产99精品国产| 欧美日韩精品欧美日韩精品| 视频一区国产视频| 国产午夜精品理论片a级大结局| 成人av网址在线观看| 91久久精品网| 日韩西西人体444www| 国产女人18毛片水真多成人如厕 | 不卡欧美aaaaa| 欧美视频第二页| 日韩精品专区在线| 亚洲图片另类小说| 日韩国产精品久久久| 国产成人免费在线观看| 欧美日韩小视频| 国产精品拍天天在线| 婷婷夜色潮精品综合在线| 国产一区激情在线| 欧美亚洲精品一区| 日韩欧美一区二区在线视频| 精品国产一区久久| 国产精品久久久久永久免费观看| 亚洲免费毛片网站| 国产美女视频91| 91精品国产黑色紧身裤美女| 国产精品麻豆视频| 久久99在线观看| 欧美日韩免费观看一区三区| 国产精品天美传媒沈樵| 青青青伊人色综合久久| 色视频成人在线观看免| 国产精品欧美精品| 麻豆一区二区三| 欧美日韩精品是欧美日韩精品| 国产免费成人在线视频| 美女视频第一区二区三区免费观看网站| www..com久久爱| 欧美www视频| 丝袜亚洲另类欧美| 91在线小视频| 国产日韩亚洲欧美综合| 美腿丝袜亚洲一区| 91精品国产综合久久精品图片 | 欧美午夜精品免费| 国产亚洲精品免费| 国内精品写真在线观看| 日韩欧美的一区| 亚洲777理论| 欧美视频在线观看一区| 亚洲精品乱码久久久久久日本蜜臀| 成人黄色电影在线| 91精品国产综合久久国产大片| 国产精品久久久久影视| 国产一区二区精品在线观看| 色综合天天综合网国产成人综合天| 欧美日韩成人在线| 美国精品在线观看| 国产日韩欧美综合一区| 国产91丝袜在线观看| 久久狠狠亚洲综合| 国产精品白丝在线| 欧美色图片你懂的| 美女爽到高潮91| 一区二区在线看| 欧美一级欧美一级在线播放| 成人免费视频免费观看| 日韩av电影天堂| 亚洲女同一区二区| 日韩美一区二区三区| 亚洲制服丝袜av| 久久色中文字幕| 国产拍揄自揄精品视频麻豆| 欧美成人女星排行榜|