-
Notifications
You must be signed in to change notification settings - Fork 14
/
stop.c
56 lines (44 loc) · 1.27 KB
/
stop.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
gcc -g -o stop stop.c
*/
#include <linux/input.h>
#include <string.h>
#include <fcntl.h>
#include <stdio.h>
#include <signal.h>
#include <time.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/sysinfo.h>
#include "checkPara.h"
#include "Frame/touch.h"
#include "Frame/touch.c"
#include "Frame/framebuffer.c"
#include "Frame/DrawCorner.c"
#include "Frame/DrawImage.h"
#include "funktion.h"
int main()
{
//Parameter einbinden, checken oder default setzen
checkDefinePara(0);
signal(SIGINT, INThandler);
int xres,yres,x;
int screenXmax, screenXmin;
int screenYmax, screenYmin;
float scaleXvalue, scaleYvalue;
int rawX, rawY, rawPressure, scaledX, scaledY;
if (openTouchScreen() == 1)
perror("error opening touch screen");
getTouchScreenDetails(&screenXmin,&screenXmax,&screenYmin,&screenYmax);
framebufferInitialize(&xres,&yres);
scaleXvalue = ((float)screenXmax-screenXmin) / xres;
printf ("X Scale Factor = %f\n", scaleXvalue);
scaleYvalue = ((float)screenYmax-screenYmin) / yres;
printf ("Y Scale Factor = %f\n", scaleYvalue);
killall();
screenOn();
drawSquare(360,3,440,240,BLACK);
system("setterm -cursor on");
if(pidCheck("screenSaveHM") != 0) system("killall -9 screenSaveHM");
if(pidCheck("screenSave") != 0) system("killall -9 screenSave");
}