Rev 1293 | Rev 1296 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1293 | Rev 1295 | ||
|---|---|---|---|
| Line 79... | Line 79... | ||
| 79 | int16_t f1_k = 0, f3_tmp = 0, f4_tmp = 0, f5_tmp = 0; |
79 | int16_t f1_k = 0, f3_tmp = 0, f4_tmp = 0, f5_tmp = 0; |
| 80 | uint8_t f7_tmp = 0, f7_sign = 0, f1_sign = 0, f3_yref = 0, xMin, xMax, yMin, yMax, f9_tmp; |
80 | uint8_t f7_tmp = 0, f7_sign = 0, f1_sign = 0, f3_yref = 0, xMin, xMax, yMin, yMax, f9_tmp; |
| 81 | gesture functionData; |
81 | gesture functionData; |
| 82 | functionData.f1=0; |
82 | functionData.f1=0; |
| 83 | functionData.f7=0; |
83 | functionData.f7=0; |
| - | 84 | #define F8_OFFSET 15 |
|
| 84 | 85 | ||
| 85 | /* Function 6 indicates the sign value of the y coordinates of the last point minus y coordinates of the first point */ |
86 | /* Function 6 indicates the sign value of the y coordinates of the last point minus y coordinates of the first point */ |
| 86 | functionData.f6 = CAN_MODULE_ENUM_TOUCH_GESTURE_F6_M; |
87 | functionData.f6 = CAN_MODULE_ENUM_TOUCH_GESTURE_F6_M; |
| 87 | if ((int16_t)buffer[endIndex].y - (int16_t)buffer[startIndex].y > 0) |
88 | if ((int16_t)buffer[endIndex].y - (int16_t)buffer[startIndex].y > 0) |
| 88 | { |
89 | { |
| Line 223... | Line 224... | ||
| 223 | functionData.f4 = CAN_MODULE_ENUM_TOUCH_GESTURE_F4_P; |
224 | functionData.f4 = CAN_MODULE_ENUM_TOUCH_GESTURE_F4_P; |
| 224 | } |
225 | } |
| 225 | 226 | ||
| 226 | /* Function 8 checks whether or not x coordinates of all the points except for the first point and the last point is between x0 and xn */ |
227 | /* Function 8 checks whether or not x coordinates of all the points except for the first point and the last point is between x0 and xn */ |
| 227 | functionData.f8 = CAN_MODULE_ENUM_TOUCH_GESTURE_F8_P; |
228 | functionData.f8 = CAN_MODULE_ENUM_TOUCH_GESTURE_F8_P; |
| 228 | if (xMin |
229 | if (xMin+F8_OFFSET < min(buffer[startIndex].x,buffer[endIndex].x) || xMax > max(buffer[startIndex].x,buffer[endIndex].x)+F8_OFFSET) |
| 229 | { |
230 | { |
| 230 | functionData.f8 = CAN_MODULE_ENUM_TOUCH_GESTURE_F8_M; |
231 | functionData.f8 = CAN_MODULE_ENUM_TOUCH_GESTURE_F8_M; |
| 231 | } |
232 | } |
| 232 | 233 | ||
| 233 | //printf("1%u2%c3%c4%c5%c6%c7%u8%c9%c\n", f1, f2, f3, f4, f5, f6, f7, f8, f9); |
234 | //printf("1%u2%c3%c4%c5%c6%c7%u8%c9%c\n", f1, f2, f3, f4, f5, f6, f7, f8, f9); |