controlcalibrationimpl.cpp
来自「一个语言识别引擎」· C++ 代码 · 共 47 行
CPP
47 行
// -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
/*
* Copyright (C) 2006 Lorenzo Natale
* CopyPolicy: Released under the terms of the GNU GPL v2.0.
*
*/
#include <yarp/dev/DeviceDriver.h>
#include <yarp/dev/ControlBoardInterfaces.h>
#include <stdio.h>
using namespace yarp::dev;
IControlCalibration::IControlCalibration()
{
calibrator=0;
}
bool IControlCalibration::setCalibrator(ICalibrator *c)
{
if (c!=0)
{
calibrator=c;
return true;
}
return false;
}
bool IControlCalibration::calibrate()
{
bool ret = false;
if (calibrator!=0)
{
fprintf(stderr, "Going to call calibrator\n");
ret=calibrator->calibrate(dynamic_cast<DeviceDriver *>(this));
}
else
fprintf(stderr, "Warning called calibrate but no calibrator was set\n");
return ret;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?