亚洲欧美第一页_禁久久精品乱码_粉嫩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;                  //判斷盲文是否存在兩個點和標(biāo)準(zhǔn)點在同一條直線上     int sign;                    //經(jīng)過第二點的標(biāo)志     int two;                    //兩次經(jīng)過第二點的標(biāo)志     int three;                   //三次經(jīng)過第二點的標(biāo)志     int four;                    //四次經(jīng)過第二點的標(biāo)志     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;      //延長或縮小所得到的新坐標(biāo)X值     unsigned short y_change;      //延長或縮小所得到的新坐標(biāo)Y值     unsigned short max_extend;    //X軸坐標(biāo)值最大可擴展的數(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;                //當(dāng)直線延長得到兩個點時就比較dis離哪個點最近就激活相應(yīng)點     double  dis2;                //當(dāng)直線延長得到兩個點時就比較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軸負(fù)方向延長              {               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ù)方向延長              {               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一区二区三区免费野_久草精品视频
久久不见久久见免费视频7| 成人av小说网| 国产激情精品久久久第一区二区| 欧日韩精品视频| 亚洲欧美在线aaa| 99麻豆久久久国产精品免费优播| 久久久久久久久久久黄色| 国产一二三精品| 国产精品水嫩水嫩| 色婷婷综合激情| 亚洲高清视频的网址| 欧美亚洲另类激情小说| 午夜av区久久| 日韩久久久久久| 国产精品123区| 国产精品成人免费| 中文字幕欧美区| 成人免费毛片app| 亚洲一区二区四区蜜桃| 欧美日韩不卡一区二区| 毛片不卡一区二区| 国产片一区二区| 欧美亚洲高清一区二区三区不卡| 五月天久久比比资源色| 日韩欧美一级二级三级久久久| 国产美女久久久久| 亚洲综合在线免费观看| 精品乱码亚洲一区二区不卡| 成人性视频免费网站| 亚洲国产一二三| 国产精品美女久久久久久久| 精品视频123区在线观看| 久久99久久精品欧美| 亚洲美女免费在线| 久久久99精品久久| 在线观看视频一区二区| 国产精品白丝jk白祙喷水网站| 一区二区三区不卡视频| 日本一二三不卡| 欧美一区二区三区的| 91成人看片片| 99热这里都是精品| 国产伦精品一区二区三区视频青涩| 亚洲欧洲精品一区二区三区不卡| 日韩欧美不卡在线观看视频| 欧美性受xxxx黑人xyx性爽| 99久久夜色精品国产网站| 国产精品一区二区黑丝| 秋霞电影网一区二区| 日本伊人午夜精品| 日本va欧美va瓶| 日韩激情中文字幕| 韩国理伦片一区二区三区在线播放| 国产婷婷色一区二区三区在线| 欧美高清在线视频| 欧美激情一区三区| 亚洲男人都懂的| 亚洲一区二区三区免费视频| 日韩电影在线一区二区三区| av在线不卡电影| 精品国产sm最大网站免费看| 亚洲精品国产一区二区精华液| 免费看欧美美女黄的网站| 91色porny| 2019国产精品| 亚洲成人av在线电影| 蜜桃免费网站一区二区三区| 99riav一区二区三区| 欧美三级在线看| 中文字幕不卡的av| 亚洲影视在线播放| 国产真实乱子伦精品视频| 一本色道久久综合狠狠躁的推荐| 欧美日韩一二三区| 国产精品久久久久久久久晋中 | 色噜噜久久综合| 7777精品伊人久久久大香线蕉的 | 2021国产精品久久精品| 一区二区三区四区av| 国产精品一区三区| 5月丁香婷婷综合| 亚洲一区在线观看免费| 国产精品一区二区三区99| 欧美日韩一二区| 日韩美女精品在线| 国产乱子轮精品视频| 7777精品伊人久久久大香线蕉完整版 | 自拍偷拍亚洲综合| av亚洲精华国产精华精| 日韩欧美国产精品一区| 美腿丝袜亚洲一区| 欧美一区二区三区婷婷月色| 亚洲乱码国产乱码精品精的特点| 国产一区美女在线| 国产午夜亚洲精品羞羞网站| 国产一区二区日韩精品| 欧美一区二区在线不卡| 久久er99热精品一区二区| 在线播放/欧美激情| 最新国产成人在线观看| 国产激情精品久久久第一区二区 | 国产欧美一区二区精品仙草咪| 久久精品久久99精品久久| 欧美一级理论性理论a| 麻豆成人91精品二区三区| 精品噜噜噜噜久久久久久久久试看| 国产精品69毛片高清亚洲| 亚洲国产美女搞黄色| 国产精品少妇自拍| 91精品国产91久久久久久一区二区| 国产成人精品免费一区二区| 午夜精品在线看| 2023国产精品视频| 91国偷自产一区二区三区成为亚洲经典 | 精品人在线二区三区| 日本一区二区三区国色天香 | 白白色亚洲国产精品| 精品欧美久久久| 韩国女主播一区| 制服丝袜av成人在线看| 日产国产欧美视频一区精品| 欧美日韩免费观看一区三区| 亚洲免费观看高清完整版在线| 欧亚一区二区三区| 五月天欧美精品| 欧美成人伊人久久综合网| 乱一区二区av| 国产无人区一区二区三区| 国产成人在线视频网站| 国产精品嫩草99a| 色激情天天射综合网| 亚洲欧洲www| 色婷婷国产精品| 日韩av不卡一区二区| 精品免费日韩av| 91亚洲精品一区二区乱码| 一区二区在线电影| 中文字幕一区二区三区四区| 日韩一区二区在线看片| 成人国产亚洲欧美成人综合网| 蜜桃av一区二区三区电影| 亚洲国产精品视频| 日韩亚洲欧美在线| 日本不卡一二三区黄网| 欧美日韩不卡一区二区| 国产精品资源站在线| 亚洲欧美偷拍三级| 免播放器亚洲一区| 色综合久久久久综合| 国产精品乱码久久久久久| 蜜桃视频在线观看一区| 日韩免费高清电影| 国产一区二区三区免费在线观看| 精品国产露脸精彩对白| 国产麻豆一精品一av一免费| 2020国产精品自拍| 成人av在线资源网| 国产精品高潮呻吟久久| 色综合久久久久久久久| 亚洲成人高清在线| 日韩美女一区二区三区四区| 国产精品18久久久久久久久久久久 | 久久免费美女视频| 国产激情视频一区二区在线观看| 国产精品污网站| 欧美性感一类影片在线播放| 午夜不卡av在线| 久久无码av三级| 色婷婷久久久久swag精品| 亚洲成人av一区二区三区| 日韩久久久精品| av在线不卡免费看| 午夜电影网一区| 国产日韩精品一区| 欧美性猛交xxxx黑人交| 久久国产精品无码网站| 国产精品入口麻豆九色| 欧美精品一二三四| 国产河南妇女毛片精品久久久 | 久久久噜噜噜久久中文字幕色伊伊| 国产白丝网站精品污在线入口| 一二三四区精品视频| 精品剧情在线观看| 91麻豆国产精品久久| 久久 天天综合| 亚洲精品第1页| 欧美精品一区二| 色屁屁一区二区| 国产精品一区二区三区网站| 亚洲一区自拍偷拍| 久久久久国色av免费看影院| 欧美特级限制片免费在线观看| 韩国三级在线一区| 亚洲一区二区在线播放相泽| 久久久久国产精品麻豆| 欧美日韩久久一区二区| 99re视频这里只有精品| 精品一区二区三区的国产在线播放| 国产精品久久久久久久久搜平片 | 日本韩国欧美一区|