hackathon-dev #1

Merged
amy merged 101 commits from hackathon-dev into develop 2019-12-12 13:56:11 -07:00
Showing only changes of commit a62364082a - Show all commits

View File

@ -11,6 +11,7 @@
#include "log.h"
#include "msg_queue.h"
#include "gpio.h"
#include "fbinit.h"
#include "time_func.h"
#define INPUT_EVENT_BATCH 16 /* number of events to retrieve from touchscreen at once */
@ -130,10 +131,12 @@ static BOOL poll_touchscreen(void)
break;
case EV_ABS:
/* Note that the touchscreen driver assumes the screen is "vertical," so swap the x and y axes */
/* Also it thinks origin is lower left with up = +y */
if (buffer[i].code == ABS_X)
touch_x = buffer[i].value;
touch_y = Fb_Info->height - buffer[i].value;
else if (buffer[i].code == ABS_Y)
touch_y = buffer[i].value;
touch_x = buffer[i].value;
break;
case EV_KEY: