Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef __LEGOTS_H__
00013 #define __LEGOTS_H__
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #pragma systemFile
00034
00035 #ifndef __COMMON_H__
00036 #include "common.h"
00037 #endif
00038
00039
00040 bool TSreadState(tSensors link);
00041
00042 #ifdef __HTSMUX_SUPPORT__
00043 bool TSreadState(tMUXSensor muxsensor);
00044 #endif
00045
00046
00047
00048
00049
00050
00051
00052 bool TSreadState(tSensors link) {
00053 if ((SensorType[link] != sensorTouch) && SensorMode[link] != modeBoolean) {
00054 SetSensorType(link, sensorTouch);
00055 SetSensorMode(link, modeBoolean);
00056 wait1Msec(10);
00057 }
00058
00059 return (SensorRaw[link] < 500) ? true : false;
00060 }
00061
00062
00063
00064
00065
00066
00067
00068 #ifdef __HTSMUX_SUPPORT__
00069 bool TSreadState(tMUXSensor muxsensor) {
00070 return (HTSMUXreadAnalogue(muxsensor) < 500) ? true : false;
00071 }
00072 #endif
00073
00074
00075 #endif // __LEGOTS_H__
00076
00077
00078
00079
00080
00081