1#include "rttaskglobals.h"
18 data->sensorValue = 0;
19 data->startingSample = 0;
21 std::srand(std::time(
nullptr));
35 double FREQUENCY = 0.5;
36 double AMPLITUDE = 0.25;
39 double secondsElapsed = ((double) controller->SampleCounterGet() - startingSample) / controller->SampleRateGet();
40 return AMPLITUDE * std::sin(2 * PI * FREQUENCY * secondsElapsed);
48 if (data->startingSample == 0) {
49 data->startingSample = controller->SampleCounterGet();
51 data->sensorValue = getSensorValue(controller, data->startingSample);
53 RTAxisGet(0)->MoveTrapezoidal(data->sensorValue, 5, 10, 10);
Represents the RMP soft motion controller. This class provides an interface to general controller con...
The RealTimeTasks namespace.