Mercurial > hg > beaglert
comparison projects/d-box/DboxSensors.h @ 15:901d205d1a3c
Updated to latest PRU library; external PRU file no longer needed. Also catch SIGTERM as well as SIGINT to clean up gracefully.
author | andrewm |
---|---|
date | Sat, 07 Feb 2015 16:41:56 +0000 |
parents | 8a575ba3ab52 |
children | 59edd5780fef |
comparison
equal
deleted
inserted
replaced
14:06f93bef7dd2 | 15:901d205d1a3c |
---|---|
35 *--------------------------------------------------------------------------------------------------------------------------------------------------- | 35 *--------------------------------------------------------------------------------------------------------------------------------------------------- |
36 */ | 36 */ |
37 class DboxSensors | 37 class DboxSensors |
38 { | 38 { |
39 public: | 39 public: |
40 int initSensors(int tk0_bus, int tk0_address, int tk1_bus, int tk1_address, int tk_file, int fsr_pin, int fsrmax, bool useNewSensors, int gpio0=-1, int gpio1=-1); | 40 int initSensors(int tk0_bus, int tk0_address, int tk1_bus, int tk1_address, int tk_file, int fsr_pin, int fsrmax, int sensorTypeToUse, int gpio0=-1, int gpio1=-1); |
41 int readSensors(); | 41 int readSensors(); |
42 int getTKTouchCount(int index); | 42 int getTKTouchCount(int index); |
43 float *getTKXPositions(int index); | 43 float *getTKXPositions(int index); |
44 float getTKYPosition(int index); | 44 float getTKYPosition(int index); |
45 float *getTKTouchSize(int index); | 45 float *getTKTouchSize(int index); |
48 | 48 |
49 DboxSensors(); | 49 DboxSensors(); |
50 ~DboxSensors(); | 50 ~DboxSensors(); |
51 | 51 |
52 private: | 52 private: |
53 bool newSensors; | 53 int sensorType; |
54 | 54 |
55 I2c_TouchKey TK0; | 55 I2c_TouchKey TK0; |
56 int tk0_touchCnt; | 56 int tk0_touchCnt; |
57 float tk0_touchPosX[5]; | 57 float tk0_touchPosX[5]; |
58 float tk0_touchPosY; | 58 float tk0_touchPosY; |