touchsensor.c

来自「为参加日本的ET机器人比赛写的LEGO机器人控制程序」· C语言 代码 · 共 68 行

C
68
字号
/******************************************************************************\
*
* File:          TouchSensor.C
* Creation date: June 23, 2008 13:42
* Latest update: July 09, 2008 16:39
* Author:        ClassBuilder
*                XXXX
* Purpose:       Method implementations of class 'TouchSensor'
* CB version:    ClassBuilder Version 2.9 (PR523)
*
* Modifications: @INSERT_MODIFICATIONS(* )
* June 23, 2008 13:42 Chijinliang
*     Added method 'DestructorInclude'
*     Added method 'ConstructorInclude'
*     Added method 'Pressed'
*     Added method '~TouchSensor'
*
* Copyright 2008, XXXXX
* All rights are reserved. Reproduction in whole or part is prohibited
* without the written consent of the copyright owner.
*
\******************************************************************************/
// Master include file
#include "JASTInTime.h"


using namespace JASTInTime;




/*
Destructor method.
*/
TouchSensor::~TouchSensor()
{
    // Put in your own code

    DestructorInclude();
}


bool TouchSensor::Pressed() const
{
    return TOUCH(SENSOR_2);
}


/*
Method which must be called first in a constructor.
*/
void TouchSensor::ConstructorInclude()
{
}


/*
Method which must be called first in a destructor.
*/
void TouchSensor::DestructorInclude()
{
}


// Methods for the relation(s) of the class


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?