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 #pragma systemFile
00033
00034 #ifndef __COMMON_H__
00035 #include "common.h"
00036 #endif
00037
00038
00039 bool TSreadState(tSensors link);
00040
00041 #ifdef __HTSMUX_SUPPORT__
00042 bool TSreadState(tMUXSensor muxsensor);
00043 #endif
00044
00045
00046
00047
00048
00049
00050
00051 bool TSreadState(tSensors link) {
00052 if ((SensorType(link) != sensorTouch) && SensorMode(link) != modeBoolean) {
00053 SetSensorType(link, sensorTouch);
00054 SetSensorMode(link, modeBoolean);
00055 wait1Msec(10);
00056 }
00057
00058 return (SensorRaw[link] < 500) ? true : false;
00059 }
00060
00061
00062
00063
00064
00065
00066
00067 #ifdef __HTSMUX_SUPPORT__
00068 bool TSreadState(tMUXSensor muxsensor) {
00069 return (HTSMUXreadAnalogue(muxsensor) < 500) ? true : false;
00070 }
00071 #endif
00072
00073
00074 #endif // __LEGOTS_H__
00075
00076
00077
00078
00079
00080