** Function: touchHeatMap ** Touchscreen Mapping, include this function after reading the touchPoint **********************************************************************/
| 199 | ** Touchscreen Mapping, include this function after reading the touchPoint |
| 200 | **********************************************************************/ |
| 201 | void touchHeatMap(struct TouchPoint t) { |
| 202 | int third_x = tftWidth / 3; |
| 203 | int third_y = tftHeight / 3; |
| 204 | |
| 205 | if (t.x > third_x * 0 && t.x < third_x * 1 && t.y > third_y) PrevPress = true; |
| 206 | if (t.x > third_x * 1 && t.x < third_x * 2 && ((t.y > third_y && t.y < third_y * 2) || t.y > tftHeight)) |
| 207 | SelPress = true; |
| 208 | if (t.x > third_x * 2 && t.x < third_x * 3) NextPress = true; |
| 209 | if (t.x > third_x * 0 && t.x < third_x * 1 && t.y < third_y) EscPress = true; |
| 210 | if (t.x > third_x * 1 && t.x < third_x * 2 && t.y < third_y) UpPress = true; |
| 211 | if (t.x > third_x * 1 && t.x < third_x * 2 && t.y > third_y * 2 && t.y < third_y * 3) DownPress = true; |
| 212 | /* |
| 213 | Touch area Map |
| 214 | ________________________________ 0 |
| 215 | | Esc | UP | | |
| 216 | |_________|_________| |_> third_y |
| 217 | | | Sel | | |
| 218 | | |_________| Next |_> third_y*2 |
| 219 | | Prev | Down | | |
| 220 | |_________|_________|_________|_> third_y*3 |
| 221 | |__Prev___|___Sel___|__Next___| 20 pixel touch area where the touchFooter is drawn |
| 222 | 0 L third_x | | |
| 223 | Lthird_x*2| |
| 224 | Lthird_x*3 |
| 225 | */ |
| 226 | } |
| 227 | |
| 228 | #endif |
| 229 |
no outgoing calls
no test coverage detected