20 lines
596 B
C++
20 lines
596 B
C++
|
/*
|
||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||
|
*/
|
||
|
#pragma once
|
||
|
|
||
|
namespace okapi {
|
||
|
template <typename T> class ControllerInput {
|
||
|
public:
|
||
|
/**
|
||
|
* Get the sensor value for use in a control loop. This method might be automatically called in
|
||
|
* another thread by the controller.
|
||
|
*
|
||
|
* @return the current sensor value, or ``PROS_ERR`` on a failure.
|
||
|
*/
|
||
|
virtual T controllerGet() = 0;
|
||
|
};
|
||
|
} // namespace okapi
|