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

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

?? process.h

?? it is about embeded system
?? H
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):

  /*****************author : DONG Shengdong********************/   /****************** process the points********************/ #ifndef _PROCESS_H #define _PROCESS_H /*--------------------initialize the struction---------------*/ #include  "math.h" #include  "string.h" #include  "loadbmp.h" #include  "blind_ime_more.h"  
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////全局變量以及宏定義////////////////////////////////// /*--------------------initialize the struction---------------*/  #define DEVICE_NAME_TOUCH "/dev/touchscreen/0raw" #define MY_PICTURE_DISPLAY "./res/girl.bmp" #define MY_PICTURE_POINT  "./res/point.bmp" #define TIME                   1 #define DEFAULTLINEDISTANCE    500 #define DEFAULTROWDISTANCE     600 #define SYLLABLE_MAX           43 #define ERROR                  200 #define POINTRADIUS            200                           #define PROPERTY_CLICK_X       600 #define PROPERTY_CLICK_Y       600 #define STOP_POINT_R_X         3000 #define STOP_POINT_R_Y         500 #define POINTS_TO_POINTS       2000   #define MAX_PROPERTY_VALUE     800 #define DEFAULTMINDIS          160 #define TANX_ERROR             0.1 #define BENCHMARK_POINT_X      2000 #define BENCHMARK_POINT_Y      3000 #define DISTANCE_CHANGE_CONSTANT 20 #define DISTANCE_CHANGE        5 #define ANGLE_CHANGE_CONSTANT  5 #define EXTEND_TO                800 #define EXTEND_TO_MIN            200/*************signal of control the time**********/ struct counttime {   pthread_mutex_t lock;   pthread_cond_t timer;   pthread_cond_t exe;   int times;   int sem;   int point_rd; };/*************the struct of proverty*************/ struct PRO{  unsigned short pointx;  unsigned short pointy;   };/*********the information of blind points***********/  typedef struct{  unsigned short x;  unsigned short y;  }POINT;/**************six points matrix******************/  typedef struct {    POINT matrix_point[6];  unsigned short distance_change;  double radian_change;  }MATRIX; /*****read the X and Y of value from touchscreen*****/  typedef struct {  unsigned short pressure;  unsigned short x;  unsigned short y;  unsigned short pad;  }TS_RET; struct counttime buffer;            //instancing the signal struct PRO  property;               //instancing the property POINT poi1[12],poi2[12],point[6]; MATRIX matrix; int count; int p1count;               //the number of  first group int p2count;               //the number of  second group int exec;                  //control the overtime int afresh;              //control the property circle int count_pro;          //the number of points of perperty int quit_s;             //send signal to quit int color;                 //顏色刷新 int colorchange=1; char blind_character[20];  
 /*************the list of syllable***************/ typedef struct {  char number[6];  unsigned short point_num;   //the number of the first group of blind character  unsigned short line;        //the number of line  unsigned short row;         //the number of row  unsigned short longslash;   //the number of long slash  unsigned short shortslash;  //the number of short slash  unsigned short longslash_minus;  //the number of minus long slash  unsigned short shortslash_minus;  //the number of minus short slash  unsigned short head_line_num;  unsigned short head_row_num;  unsigned short head_exist;     }SYL_RET;  SYL_RET List[SYLLABLE_MAX]={	{"12",	  2,  0,	1,  0,	0,  0,	0,  1,	2,	1},	{"13",	  2,  0,	0,  0,	0,  0,	0,  1,	2,	1},	{"14",	  2,  1,	0,  0,	0,  0,	0,  2,	1,	1},	{"15",	  2,  0,	0,  0,	1,  0,	0,  1,	1,	1},	{"16",	  2,  0,	1,  0,	0,  0,	0,  1,	1,	1},	{"24",	  2,  0,	0,  0,	0,  0,	1,  1,	1,	0},	{"34",	  2,  0,	0,  0,	0,  1,	0,  1,	1,	0},	{"123",	  3,  0,	2,  0,	0,  0,	0,  1,	3,	1},	{"124",   3,  1,	1,  0,	0,  0,	1,  2,	2,	1},	{"125",   3,  1,	1,  0,	1,  0,	0,  1,	2,	1},	{"126",	  3,  0,	1,  1,	1,  0,	0,  1,	2,	1},	{"134",	  3,  1,	0,  0,	0,  1,	0,  2,	2,	1},	{"135",	  3,  0,	0,  0,	1,  0,	1,  1,	2,	1},	{"136",	  3,  1,	0,  1,	0,  0,	0,  1,	2,	1},	{"145",	  3,  1,	1,  0,	1,  0,	0,  2,	1,	1},	{"146",	  3,  1,	0,  1,	0,  0,	0,  2,	1,	1},	{"156",	  3,  0,	1,  1,	1,  0,	0,  1,	1,	1},	{"234",	  3,  0,	1,  0,	0,  1,	1,  1,	2,	0},	{"245",	  3,  1,	1,  0,	0,  0,	1,  2,	1,	0},	{"246",	  3,  0,	0,  0,	1,  0,	1,  1,	1,	0},	{"345",	  3,  0,	1,  0,	0,  1,	1,  1,	1,	0},	{"346",	  3,  1,	0,  0,	0,  1,	0,  2,	1,	0},	{"1234",  4,  1,	2,  0,	0,  1,	1,  2,	3,	1},	{"1235",  4,  1,	2,  0,	1,  0,	1,  1,	3,	1},	{"1236",  4,  1,	2,  1,	1,  0,	0,  1,	3,	1},	{"1245",  4,  2,	2,  0,	1,  0,	1,  2,	2,	1},	{"1246",  4,  1,	1,  1,	1,  0,	1,  2,	2,	1},	{"1256",  4,  1,	2,  1,	2,  0,	0,  1,	2,	1},	{"1345",  4,  1,	1,  0,	1,  1,	1,  2,	2,	1},	{"1346",  4,  2,	0,  1,	0,  1,	0,  2,	2,	1},	{"1356",  4,  1,	1,  1,	1,  0,	1,  1,	2,	1},	{"1456",  4,  1,	2,  1,	1,  0,	0,  2,	1,	1},	{"2345",  4,  1,	2,  0,	0,  1,	2,  2,	2,	0},	{"2346",  4,  1,	1,  0,	1,  1,	1,  1,	2,	0},	{"2456",  4,  1,	2,  0,	1,  0,	1,  2,	1,	0},	{"3456",  4,  1,	2,  0,	0,  1,	1,  2,	1,	0},	{"12345", 5,  2,	3,  0,	1,  1,	2,  2,	3,	1},	{"12346", 5,  2,	2,  1,	1,  1,	1,  2,	3,	1},	{"12356", 5,  2,	3,  1,	2,  0,	1,  1,	3,	1},	{"12456", 5,  2,	3,  1,	2,  0,	1,  2,	2,	1},	{"13456", 5,  2,	2,  1,	1,  1,	1,  2,	2,	1},	{"23456", 5,  2,	3,  0,	1,  1,	2,  2,	2,	0},	{"123456",6,  3,	4,  1,	2,  1,	2,  2,	3,	1}  };
/////////////////////////////////////////////////////////////////////////////////////////////////
 /*-------------the head of the function---------*/ void init(); void initpro(); void initpoint();            //initialize the value of points groups is 0 void initmatrix(); void varinit(); int activation(POINT poival[],int pointcount,int aim,int binary[]); void getnumber(int binarynumber[],char number[]); void  matrix_set(); char to_char(int NO); void * point_receive(void * data); void * process(void * data ); void * property_set( void * data); void * overtime( void * data ); void * check_pro( void * data ); int pro_process(POINT point_temp[]); void * time_count(void * data);   ////////////////////////////////////////////////////////////////////////////////////////////// /*-----------the function to initialize the struct value---------*/  void init()  {   pthread_mutex_init(&buffer.lock,NULL); /* mutex ensuring exclusive access to change the value of times */   pthread_cond_init(&buffer.timer,NULL);  /* signaled when times is 0 */   pthread_cond_init(&buffer.exe,NULL);   buffer.times = 0;                       /* the initial value */   buffer.sem = 1;   buffer.point_rd =1;  }  /*-----------the function to initialize value of property--------------*/  void initpro()  {   property.pointx = DEFAULTLINEDISTANCE;   property.pointy = DEFAULTROWDISTANCE;   } /*---------the function to initialize value of matrix points---------*/  void initmatrix()  {      matrix.matrix_point[0].x=BENCHMARK_POINT_X;   matrix.matrix_point[0].y=BENCHMARK_POINT_Y;  } /*------------the function to initialize the value of points----*/  void initpoint()  {   int i;    /*---------------------initialize the POINT---------------------------*/   for(i=0;i<12;i++)   {        poi1[i].x=0;     poi1[i].y=0;     poi2[i].x=0;     poi2[i].y=0;     if(i<6)     {      point[i].x=0;      point[i].y=0;     }   }   }    void varinit()  {    count=0;    p1count=0;               //the number of  first group    p2count=0;               //the number of  second group    exec=0;                  //control the overtime    afresh = 1;              //control the property circle    count_pro  = 0;          //the number of points of perperty    quit_s  = 1;             //send signal to quit    //color=0;                 //顏色刷新    strcpy(blind_character,"\0");  }
 
 ////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////功能函數(shù)定義///////////////////////////////     /*--------------以首點(diǎn)為基點(diǎn)將盲文點(diǎn)整體平移至正規(guī)6點(diǎn)規(guī)陣------------*/     /*------matrix為盲文點(diǎn)移動(dòng)到正規(guī)矩陣相應(yīng)的第n個(gè)點(diǎn) --------*/

  /*----以正規(guī)矩陣的首點(diǎn)延長(zhǎng)或縮短所打盲文點(diǎn)(除首點(diǎn))判斷是否經(jīng)過(guò)        正規(guī)矩陣的其它的點(diǎn),并確定是哪個(gè)點(diǎn)------------------------*/        int activation(POINT poival[],int pointcount,int aim,int binary[])   {  //////////////////////////////////////////////////////////////////////////  ///////////////////////////////變量聲明集合/////////////////////////////////     int i,val; ////////////////////循環(huán)次數(shù)     int pointnum;                //直線延長(zhǎng)過(guò)程所經(jīng)過(guò)的點(diǎn)數(shù)     int pointnumanother;          //第2點(diǎn)和第6點(diǎn)的判斷     int poiline;                  //判斷盲文是否存在兩個(gè)點(diǎn)和標(biāo)準(zhǔn)點(diǎn)在同一條直線上     int sign;                    //經(jīng)過(guò)第二點(diǎn)的標(biāo)志     int two;                    //兩次經(jīng)過(guò)第二點(diǎn)的標(biāo)志     int three;                   //三次經(jīng)過(guò)第二點(diǎn)的標(biāo)志     int four;                    //四次經(jīng)過(guò)第二點(diǎn)的標(biāo)志     unsigned short x_temp;       //臨時(shí)變量     unsigned short y_temp;       //臨時(shí)變量
     unsigned short x_move;       //盲文點(diǎn)X軸移動(dòng)的距離
     unsigned short y_move;       //盲文點(diǎn)Y軸移動(dòng)的距離     unsigned short x_standard;     //正規(guī)矩陣的首點(diǎn)的X軸值     unsigned short y_standard;     //正規(guī)矩陣的首點(diǎn)的Y軸值     unsigned short x_change;      //延長(zhǎng)或縮小所得到的新坐標(biāo)X值     unsigned short y_change;      //延長(zhǎng)或縮小所得到的新坐標(biāo)Y值     unsigned short max_extend;    //X軸坐標(biāo)值最大可擴(kuò)展的數(shù)值     unsigned short step_extend;    //X軸坐值一次可擴(kuò)展的數(shù)值     unsigned short divide_1_x;    //盲點(diǎn)中,經(jīng)過(guò)第二點(diǎn)一次時(shí)的X值     unsigned short divide_1_y;    //盲點(diǎn)中,經(jīng)過(guò)第二點(diǎn)一次時(shí)的Y值     unsigned short divide_2_x;    //盲點(diǎn)中,經(jīng)過(guò)第二點(diǎn)兩次時(shí)的X值     unsigned short divide_2_y;    //盲點(diǎn)中,經(jīng)過(guò)第二點(diǎn)兩次時(shí)的Y值     unsigned short divide_3_x;    //盲點(diǎn)中,經(jīng)過(guò)第二點(diǎn)三次時(shí)的X值     unsigned short divide_3_y;    //盲點(diǎn)中,經(jīng)過(guò)第二點(diǎn)三次時(shí)的Y值     double  dis1;                //當(dāng)直線延長(zhǎng)得到兩個(gè)點(diǎn)時(shí)就比較dis離哪個(gè)點(diǎn)最近就激活相應(yīng)點(diǎn)     double  dis2;                //當(dāng)直線延長(zhǎng)得到兩個(gè)點(diǎn)時(shí)就比較dis離哪個(gè)點(diǎn)最近就激活相應(yīng)點(diǎn)     double A;                   //直線系數(shù) 例:Ax+y=B     double B;                   //直線系數(shù) 例:Ax+y=B     double distance;              //測(cè)試到個(gè)點(diǎn)的距離     int binarynumber[6];          //盲文     例:101000,哪位為1表示盲文所打的點(diǎn)有效     POINT poi[6];         /////////////////////////變量初始化     pointnumanother=0;     poiline =0;     two =0;     three =0;     four =0;     for(i=0;i<pointcount;i++)     {       poi[i].x=poival[i].x;       poi[i].y=poival[i].y;     }    
      x_move = poi[0].x - matrix.matrix_point[aim].x;
      y_move = poi[0].y - matrix.matrix_point[aim].y;
  

    for(i=0;i<pointcount;i++)    //盲文整體平移
    {
     
     poi[i].x=poi[i].x-x_move;
     poi[i].y=poi[i].y-y_move;

    }        /*for(i=0;i<6;i++)    printf("m x:%d,m y:%d\n", matrix.matrix_point[i].x,matrix.matrix_point[i].y);*/     for(i=0;i<pointcount;i++)     printf("poi[i].x%d--poi[i].y%d-\n",poi[i].x,poi[i].y);     for(val=1;val<pointcount;val++)      {      ///////////////變量在循環(huán)之前賦值        dis1 = 0;        dis2 = 0;	pointnum = 0;          x_standard = matrix.matrix_point[aim].x;        y_standard = matrix.matrix_point[aim].y;        x_change   = x_standard;        y_change   = y_standard;                    x_temp     = poi[val].x;        y_temp     = poi[val].y;        sign=0;        for(i=0;i<6;i++)
		     
           binarynumber[i] = 0 ;      /*-------------------計(jì)算直線的系數(shù)---------------*/        if(x_standard-x_temp!=0)        {          A = (double)(y_temp-y_standard)/(x_standard-x_temp);	  B = A*x_standard+y_standard;        }        /*-----直線以DISTANCE_CHANGE_CONSTANT為單位延長(zhǎng)----*/      /*-----DISTANCE_REDUCE------*/       // printf("A:%f--B:%f\n",A,B);        if(A>15)          {             max_extend=100;             step_extend=1;          }        else if(A>10)          {             max_extend=200;             step_extend=2;          }        else if(A>5)          {             max_extend=400;             step_extend=5;          }        else if(A>3)          {             max_extend=600;             step_extend=10;          }        else if(A>1)          {             max_extend=700;             step_extend=15;          }          else if(A>=0)          {             max_extend=EXTEND_TO;             step_extend=DISTANCE_CHANGE_CONSTANT;          }                else if(A>-1)          {             max_extend=EXTEND_TO;             step_extend=DISTANCE_CHANGE_CONSTANT;          }        else if(A>-3)          {             max_extend=700;             step_extend=15;          }         else if(A>-5)          {             max_extend=600;             step_extend=10;          }                  else if(A>-10)          {             max_extend=400;             step_extend=5;           }        else if(A>=-15)          {             max_extend=200;             step_extend=2;           }        else          {             max_extend=100;             step_extend=1;          }                                            //printf("begin-%d\n",val);        while(x_change-x_standard<=max_extend&&x_standard-x_change<=max_extend)	           {              if(x_standard<x_temp)  //向X軸正方向延長(zhǎng)              {                     x_change = x_change+step_extend;	        y_change = B-A*x_change;               // printf("x_change:%d---y_change:%d\n",x_change,y_change);                                        }              else if(x_standard>x_temp) //向X軸負(fù)方向延長(zhǎng)              {               x_change = x_change-step_extend;	       y_change = B-A*x_change;              // printf("x_change:%d---y_change:%d\n",x_change,y_change);              }              else                    //向Y軸負(fù)方向延長(zhǎng)              {               x_change = x_standard;               y_change = y_change-DISTANCE_CHANGE_CONSTANT;               if(y_change<1000)                  break;              }              /*                      for(i=0;i<6;i++)              {               distance=sqrt((double)(x_change-matrix.matrix_point[i].x)*                                     (x_change-matrix.matrix_point[i].x)+                                     (y_change-matrix.matrix_point[i].y)*                                     (y_change-matrix.matrix_point[i].y));               printf("distance:%f\n",distance);              }               printf("end\n");             */           /*--------正規(guī)矩陣第1個(gè)點(diǎn)的區(qū)域范圍-------------*/

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国内精品国产成人| 欧美精品免费视频| 国产成人免费xxxxxxxx| 美腿丝袜亚洲综合| 久久不见久久见中文字幕免费| 亚洲电影中文字幕在线观看| 亚洲精品国产第一综合99久久| 亚洲色图第一区| 亚洲精选免费视频| 一区二区三区精品视频在线| 一区二区欧美精品| 国产精品夜夜爽| 豆国产96在线|亚洲| 国产电影精品久久禁18| 处破女av一区二区| 成人高清免费在线播放| 91麻豆自制传媒国产之光| 在线视频你懂得一区二区三区| 色94色欧美sute亚洲线路一ni| 精品成人a区在线观看| 欧美大片日本大片免费观看| 久久综合五月天婷婷伊人| 日韩欧美一区电影| 91麻豆国产精品久久| 91黄色在线观看| 欧美亚一区二区| 日韩亚洲欧美在线| 久久精品一区四区| 国产精品成人在线观看| 亚洲精品欧美在线| 日韩av电影免费观看高清完整版在线观看 | 风间由美一区二区三区在线观看| 丰满少妇久久久久久久| 成人国产视频在线观看| 欧美性色黄大片手机版| 日韩视频中午一区| 亚洲国产高清不卡| 一区二区三区成人| 美女脱光内衣内裤视频久久影院| 国产一区二区三区日韩| 色婷婷亚洲综合| 日韩欧美一区二区三区在线| 国产精品素人一区二区| 亚洲第一狼人社区| 国产激情一区二区三区| 欧美日韩在线直播| 国产亚洲欧美日韩俺去了| 亚洲精选免费视频| 精品亚洲国内自在自线福利| 成人h动漫精品一区二区| 欧美在线999| 亚洲精品在线观看网站| 亚洲欧洲综合另类| 日韩欧美国产一区二区三区 | 精品一区二区在线播放| 日本高清不卡aⅴ免费网站| 欧美一区二区三级| 日韩一区日韩二区| 久久99久久精品欧美| 91日韩一区二区三区| 欧美精品一区二区三区一线天视频| 成人免费在线观看入口| 久久99国产精品久久| 91国产丝袜在线播放| 欧美激情在线一区二区三区| 日韩中文字幕麻豆| 91片黄在线观看| 亚洲国产高清在线| 捆绑调教一区二区三区| 欧美日韩午夜精品| 亚洲国产精品激情在线观看| 麻豆国产精品视频| 在线观看视频一区二区欧美日韩| 久久久久久久一区| 免费在线观看视频一区| 91黄视频在线观看| 国产精品成人免费精品自在线观看| 秋霞国产午夜精品免费视频| 色久优优欧美色久优优| 国产精品三级av在线播放| 免费精品视频在线| 欧美日韩色综合| 亚洲欧美电影院| 成人动漫中文字幕| 久久综合色鬼综合色| 日本vs亚洲vs韩国一区三区二区 | 欧美日韩一区二区在线观看视频| 国产精品久久久久影视| 国产精品羞羞答答xxdd| 91精品国产福利| 亚洲va欧美va国产va天堂影院| 3atv一区二区三区| 午夜影院在线观看欧美| 欧洲精品一区二区| 一区二区三区色| 91蜜桃视频在线| 亚洲精品国产一区二区精华液 | 欧美mv日韩mv亚洲| 亚洲成av人片| 欧美亚洲国产一区二区三区| 亚洲免费大片在线观看| 99久久久国产精品| 中文字幕中文字幕一区| 成人免费福利片| 中文一区一区三区高中清不卡| 国产精品1024| 亚洲国产精品t66y| 成人免费看的视频| 国产精品久久久久久妇女6080 | 欧美日韩一级大片网址| 亚洲成人高清在线| 91精品视频网| 美女国产一区二区| 国产欧美日韩精品a在线观看| 国产福利精品一区| 亚洲桃色在线一区| 欧美熟乱第一页| 婷婷国产v国产偷v亚洲高清| 7777精品伊人久久久大香线蕉经典版下载 | 色综合久久综合网97色综合 | 9久草视频在线视频精品| 国产精品成人一区二区艾草 | 国产欧美日韩在线| 97久久精品人人做人人爽50路| 亚洲精品免费电影| 91精品国产综合久久精品图片| 日韩电影在线一区二区三区| 久久综合狠狠综合| 99久久精品国产麻豆演员表| 亚洲欧洲日韩综合一区二区| 一本到一区二区三区| 视频一区在线视频| 久久久久久**毛片大全| 91丨porny丨户外露出| 香蕉影视欧美成人| 日韩午夜激情电影| 成人av在线一区二区三区| 一级日本不卡的影视| 欧美一区二区久久久| 国产成人av在线影院| 亚洲国产精品久久久久婷婷884| 一区二区三区中文字幕| 欧美成人高清电影在线| 97精品国产97久久久久久久久久久久 | 欧美国产成人精品| 91高清视频在线| 老司机精品视频在线| 国产精品乱码妇女bbbb| 欧美日韩国产乱码电影| 亚洲人成人一区二区在线观看| 欧美一区二区三区四区久久 | 欧美曰成人黄网| 天天免费综合色| 久久精品一区蜜桃臀影院| 欧美亚洲自拍偷拍| 国产精品综合在线视频| 亚洲妇女屁股眼交7| 国产精品乱码妇女bbbb| 欧美日韩成人在线| 成人免费的视频| 奇米综合一区二区三区精品视频| 欧美国产激情二区三区| 91麻豆精品国产| 97久久超碰国产精品电影| 另类小说视频一区二区| 中文字幕乱码一区二区免费| 欧美久久一区二区| av欧美精品.com| 国内不卡的二区三区中文字幕| 一区二区三区在线视频观看58| 久久久精品综合| 日韩一区二区三区四区| 在线观看欧美精品| 国产福利91精品一区| 日本亚洲免费观看| 一区二区三区四区视频精品免费| 久久影院午夜论| 91精品国产色综合久久不卡电影| 99精品一区二区| 国产成人免费xxxxxxxx| 老汉av免费一区二区三区 | 韩国av一区二区三区| 337p粉嫩大胆噜噜噜噜噜91av | 欧美丝袜丝nylons| av一区二区三区四区| 国产一区二区毛片| 久久av资源站| 日本成人在线网站| 亚洲bdsm女犯bdsm网站| 一区二区三区日本| 亚洲三级久久久| 一区二区中文视频| 国产精品久久久久婷婷| 国产欧美精品一区| 久久久久久久久99精品| 精品美女被调教视频大全网站| 欧美精品v国产精品v日韩精品| 欧美亚一区二区| 欧美三级电影网| 欧美视频在线一区|