00001 00007 // 00008 // The contents of this file are subject to the Mozilla Public License 00009 // Version 1.0 (the "License"); you may not use this file except in 00010 // compliance with the License. You may obtain a copy of the License 00011 // at http://www.mozilla.org/MPL/ 00012 // 00013 // Software distributed under the License is distributed on an "AS IS" 00014 // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 00015 // the License for the specific language governing rights and 00016 // limitations under the License. 00017 // 00018 // This software was developed as part of the legOS project. 00019 // 00020 // Contributor: Pat Welch (legOS@mousebrains.com) 00021 #ifndef _TouchSensor_H_ 00022 #define _TouchSensor_H_ 00023 00024 #include <config.h> 00025 #include <c++/Sensor.H> 00026 00027 #if defined(CONF_DSENSOR) 00028 00044 class TouchSensor : public Sensor { 00045 public: 00051 TouchSensor(const Sensor::Port port) : Sensor(port, false) {} 00056 bool pressed() const {return TOUCH(sensor);} 00057 }; 00058 00059 #else // CONF_DSENSOR 00060 #warning Enable CONF_DSENSOR to use TouchSensor.H 00061 #endif // CONF_DSENSOR 00062 #endif // _TouchSensor_H_
brickOS is released under the
Mozilla Public License.
Original code copyright 1998-2002 by the authors. |