source: proiecte/SIMEO/Simeo/src/SimeoEngine/Actuator.cpp @ 167

Last change on this file since 167 was 167, checked in by (none), 14 years ago

Simeo: added final project and also older proof of concept code.

We used Git for version control, so look at the Git repo
in SIMEO/Simeo/ for more info.

File size: 417 bytes
Line 
1#include <stdio.h>
2#include "Actuator.h"
3
4Actuator::Actuator(Channel *chan, channelData *data)
5: X(chan)
6{
7        m_data = new channelData(*data);
8}
9
10Actuator::~Actuator()
11{
12        delete m_data;
13}
14
15channelData *Actuator::getData()
16{
17        return m_data;
18}
19
20void Actuator::setTargetAngle(float angle)
21{
22        m_data->angle = angle;
23}
24
25void Actuator::update()
26{
27        float angle;
28        angle = m_data->angle;
29        m_chan->write(&angle, MPI_FLOAT, 1);
30}
Note: See TracBrowser for help on using the repository browser.