Last change
on this file since 10256 was
9780,
checked in by georgr, 11 years ago
|
WiiCpp library successfully added - won't work without libbluetooth-dev
|
File size:
498 bytes
|
Rev | Line | |
---|
[9780] | 1 | #include "gyrosample.h" |
---|
| 2 | |
---|
| 3 | using namespace std; |
---|
| 4 | |
---|
| 5 | GyroSample::GyroSample(float r, float p, float y) |
---|
| 6 | : Sample() |
---|
| 7 | { |
---|
| 8 | roll_ = r; |
---|
| 9 | pitch_ = p; |
---|
| 10 | yaw_ = y; |
---|
| 11 | logType = WIIC_LOG_GYRO; |
---|
| 12 | } |
---|
| 13 | |
---|
| 14 | GyroSample::GyroSample(const string& line) |
---|
| 15 | : Sample() |
---|
| 16 | { |
---|
| 17 | istringstream inLine(line); |
---|
| 18 | inLine >> relTimestamp >> roll_ >> pitch_ >> yaw_; |
---|
| 19 | logType = WIIC_LOG_GYRO; |
---|
| 20 | } |
---|
| 21 | |
---|
| 22 | void GyroSample::save(ofstream& out) |
---|
| 23 | { |
---|
| 24 | out << "GYRO " << getTimestampFromGestureStart() << " " << roll_ << " " << pitch_ << " " << yaw_ << endl; |
---|
| 25 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.