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

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

?? process.h~

?? it is about embeded system
?? H~
?? 第 1 頁 / 共 4 頁
字號:

  /*****************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ù)定義///////////////////////////////     /*--------------以首點為基點將盲文點整體平移至正規(guī)6點規(guī)陣------------*/     /*------matrix為盲文點移動到正規(guī)矩陣相應(yīng)的第n個點 --------*/

  /*----以正規(guī)矩陣的首點延長或縮短所打盲文點(除首點)判斷是否經(jīng)過        正規(guī)矩陣的其它的點,并確定是哪個點------------------------*/        int activation(POINT poival[],int pointcount,int aim,int binary[])   {  //////////////////////////////////////////////////////////////////////////  ///////////////////////////////變量聲明集合/////////////////////////////////     int i,val; ////////////////////循環(huán)次數(shù)     int pointnum;                //直線延長過程所經(jīng)過的點數(shù)     int pointnumanother;          //第2點和第6點的判斷     int poiline;                  //判斷盲文是否存在兩個點和標準點在同一條直線上     int sign;                    //經(jīng)過第二點的標志     int two;                    //兩次經(jīng)過第二點的標志     int three;                   //三次經(jīng)過第二點的標志     int four;                    //四次經(jīng)過第二點的標志     unsigned short x_temp;       //臨時變量     unsigned short y_temp;       //臨時變量
     unsigned short x_move;       //盲文點X軸移動的距離
     unsigned short y_move;       //盲文點Y軸移動的距離     unsigned short x_standard;     //正規(guī)矩陣的首點的X軸值     unsigned short y_standard;     //正規(guī)矩陣的首點的Y軸值     unsigned short x_change;      //延長或縮小所得到的新坐標X值     unsigned short y_change;      //延長或縮小所得到的新坐標Y值     unsigned short max_extend;    //X軸坐標值最大可擴展的數(shù)值     unsigned short step_extend;    //X軸坐值一次可擴展的數(shù)值     unsigned short divide_1_x;    //盲點中,經(jīng)過第二點一次時的X值     unsigned short divide_1_y;    //盲點中,經(jīng)過第二點一次時的Y值     unsigned short divide_2_x;    //盲點中,經(jīng)過第二點兩次時的X值     unsigned short divide_2_y;    //盲點中,經(jīng)過第二點兩次時的Y值     unsigned short divide_3_x;    //盲點中,經(jīng)過第二點三次時的X值     unsigned short divide_3_y;    //盲點中,經(jīng)過第二點三次時的Y值     double  dis1;                //當直線延長得到兩個點時就比較dis離哪個點最近就激活相應(yīng)點     double  dis2;                //當直線延長得到兩個點時就比較dis離哪個點最近就激活相應(yīng)點     double A;                   //直線系數(shù) 例:Ax+y=B     double B;                   //直線系數(shù) 例:Ax+y=B     double distance;              //測試到個點的距離     int binarynumber[6];          //盲文     例:101000,哪位為1表示盲文所打的點有效     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 ;      /*-------------------計算直線的系數(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為單位延長----*/      /*-----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軸正方向延長              {                     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軸負方向延長              {               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軸負方向延長              {               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個點的區(qū)域范圍-------------*/

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品成人在线观看| 日韩精品一区二区三区四区| 欧美精品在欧美一区二区少妇| 99久精品国产| 欧美高清dvd| 久久久久久久久久久99999| 日韩一区在线免费观看| 午夜天堂影视香蕉久久| 国产一区不卡精品| 欧美视频三区在线播放| 久久在线免费观看| 亚洲综合色丁香婷婷六月图片| 秋霞成人午夜伦在线观看| 成人黄色av网站在线| 91精品国产91久久久久久最新毛片| 久久久青草青青国产亚洲免观| 亚洲综合色区另类av| 国产成人鲁色资源国产91色综| 欧美午夜在线观看| 国产精品福利一区| 亚洲一区二区三区激情| 波多野结衣中文字幕一区二区三区| 91麻豆精品国产91久久久资源速度| 欧美高清在线精品一区| 美女一区二区久久| 欧美在线观看一二区| 中文欧美字幕免费| 狠狠色丁香九九婷婷综合五月| 欧美人与禽zozo性伦| 国产色综合一区| 亚洲综合激情网| 91天堂素人约啪| 国产日韩精品一区二区三区 | 欧美综合欧美视频| 国产视频一区二区在线| 黄色日韩三级电影| 欧美一级片免费看| 午夜久久久久久久久久一区二区| 91视视频在线观看入口直接观看www | 五月天亚洲精品| 色综合久久综合| 中文字幕在线观看不卡视频| 狠狠久久亚洲欧美| 日韩欧美一卡二卡| 亚洲午夜免费视频| 国产一区二区导航在线播放| 欧美一区二区视频网站| 亚洲妇女屁股眼交7| 欧美无乱码久久久免费午夜一区| 一区二区三区在线影院| 色综合色综合色综合| 亚洲欧美视频在线观看视频| 色综合天天综合狠狠| 亚洲人成7777| 欧美调教femdomvk| 天天影视色香欲综合网老头| 91 com成人网| 久久91精品久久久久久秒播| 亚洲精品五月天| 一本色道久久综合狠狠躁的推荐| 中文字幕av一区二区三区高| 国内精品视频一区二区三区八戒| 久久免费电影网| av电影天堂一区二区在线观看| 国产精品国产三级国产有无不卡| 99久久精品一区二区| 亚洲欧美日韩精品久久久久| 在线亚洲精品福利网址导航| 日韩黄色一级片| 欧美精品一区二区不卡| av日韩在线网站| 亚洲动漫第一页| 日韩欧美国产高清| 麻豆精品新av中文字幕| 中文字幕+乱码+中文字幕一区| 国产成人自拍在线| 亚洲图片激情小说| 欧美三级视频在线播放| 久久99国产精品免费| 国产三级久久久| 色综合天天综合在线视频| 一区二区视频在线看| 欧美色综合天天久久综合精品| 蜜臀av一级做a爰片久久| 亚洲国产成人午夜在线一区| 欧美羞羞免费网站| 国产精品一二三区在线| 亚洲精品一二三| 久久色.com| 在线免费观看一区| 国产在线麻豆精品观看| 亚洲视频一区二区在线观看| 欧美一二三区在线观看| 粗大黑人巨茎大战欧美成人| 欧美国产日韩一二三区| 欧美无砖专区一中文字| 国内外成人在线| 亚洲人成在线播放网站岛国| 欧美剧情电影在线观看完整版免费励志电影| 日本欧美一区二区| 亚洲精品欧美综合四区| 久久综合色婷婷| 欧美丝袜第三区| 99精品热视频| 国产乱码精品一区二区三| 亚洲一区二区三区视频在线| 日本一区二区三区电影| 欧美日韩国产不卡| caoporm超碰国产精品| 九九热在线视频观看这里只有精品| 亚洲精品高清视频在线观看| 欧美激情综合在线| 久久综合九色综合97婷婷| 91精品国产麻豆国产自产在线| 成+人+亚洲+综合天堂| 日韩激情在线观看| 国产日产欧美一区| 久久午夜电影网| 日韩一区二区三区四区五区六区| 成人一区二区三区| 韩国av一区二区三区四区| 日本美女一区二区| 日韩精品一二三区| 亚洲成人一二三| 亚洲国产成人精品视频| 亚洲影视资源网| 亚洲一区二区av在线| 亚洲午夜激情网站| 亚洲激情在线播放| 亚洲欧美视频在线观看视频| 一区二区三区四区亚洲| 亚洲日本护士毛茸茸| 亚洲免费大片在线观看| 亚洲三级在线播放| www国产成人| 欧美美女网站色| 精品日韩av一区二区| 99re成人在线| 丁香一区二区三区| 99re免费视频精品全部| 色综合久久久久综合体| 91精品国产高清一区二区三区 | 国产不卡在线一区| 97久久人人超碰| 91亚洲精华国产精华精华液| 色综合天天综合网天天狠天天 | 欧美tickling网站挠脚心| 精品剧情在线观看| 国产欧美日韩在线| 国产精品天干天干在观线| 亚洲精品伦理在线| 亚洲欧洲精品一区二区精品久久久| 国产精品天干天干在观线| 亚洲视频香蕉人妖| 亚洲一区二区综合| 国产精品进线69影院| 夜夜精品浪潮av一区二区三区| 日韩电影一区二区三区四区| 9色porny自拍视频一区二区| 在线免费观看视频一区| 中文字幕一区在线观看视频| 国产经典欧美精品| 欧美一区二区三区系列电影| 亚洲女子a中天字幕| 国产综合色视频| 日韩精品一区二区三区视频播放 | 国产黄色精品视频| 制服.丝袜.亚洲.中文.综合| 亚洲九九爱视频| 99这里只有久久精品视频| 国产香蕉久久精品综合网| 精品一区二区三区av| 欧美一区二区大片| 婷婷激情综合网| 在线亚洲免费视频| 亚洲免费看黄网站| 成年人午夜久久久| 日本一区二区三区dvd视频在线| 理论电影国产精品| 日韩精品福利网| 欧美日韩国产a| 免费在线观看精品| 久久品道一品道久久精品| 国产福利精品导航| 亚洲欧洲日韩女同| 欧美日本在线观看| 美女一区二区久久| 国产农村妇女毛片精品久久麻豆 | 国产老肥熟一区二区三区| 国产亚洲一二三区| 91影视在线播放| 视频在线在亚洲| 久久综合久久综合久久| 成人免费看片app下载| 一区二区三区在线观看欧美| 欧美精品乱码久久久久久| 韩国一区二区三区| 自拍偷拍亚洲综合| 欧美麻豆精品久久久久久| 美国精品在线观看|