整理代码
This commit is contained in:
commit
c7b4e178ec
364 changed files with 59691 additions and 0 deletions
47
hardware/Sensor.cpp
Normal file
47
hardware/Sensor.cpp
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
* INCLUDE
|
||||
*******************************************************************************
|
||||
*/
|
||||
#include "Sensor.h"
|
||||
|
||||
namespace Hardware
|
||||
{
|
||||
/*
|
||||
*******************************************************************************
|
||||
* CLASS DEFINE
|
||||
*******************************************************************************
|
||||
*/
|
||||
Sensor::Sensor(Type type): _type(type)
|
||||
{
|
||||
}
|
||||
|
||||
Sensor::~Sensor()
|
||||
{
|
||||
}
|
||||
|
||||
void Sensor::read(float& value)
|
||||
{
|
||||
}
|
||||
|
||||
void Sensor::read(float values[])
|
||||
{
|
||||
}
|
||||
|
||||
Sensor::Type Sensor::type()
|
||||
{
|
||||
return _type;
|
||||
}
|
||||
|
||||
SensorManager::SensorCollection SensorManager::_sensorCollection;
|
||||
|
||||
Sensor& SensorManager::getDefaultSensor(Sensor::Type type)
|
||||
{
|
||||
return *_sensorCollection[type][0];
|
||||
}
|
||||
|
||||
void SensorManager::registerSensor(Sensor::Type type, Sensor::Ptr pSensor)
|
||||
{
|
||||
_sensorCollection[type].push_back(pSensor);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue