@@ -17,30 +17,30 @@ WiimoteManager m;
17
17
m.onConnection([](Wiimote* wiimote) {
18
18
std::cout << "Wiimote " << wiimote->id() + 1 << " connected!" << std::endl;
19
19
20
- wiimote->onButton([wiimote, &stream, name ](WiimoteButton button, bool down) {
20
+ wiimote->onButton([wiimote](WiimoteButton button, bool down) {
21
21
const char* buttonName = WiimoteButtons::toString(button);
22
22
if (buttonName) {
23
23
std::cout << buttonName << down ? " pressed" : " released" << std::endl;
24
24
}
25
25
});
26
26
27
- wiimote->onNunchuckButton([wiimote, &stream, name ](NunchuckButton button, bool down) {
27
+ wiimote->onNunchuckButton([wiimote](NunchuckButton button, bool down) {
28
28
const char* buttonName = NunchuckButtons::toString(button);
29
29
if (buttonName) {
30
30
std::cout << buttonName << down ? " pressed" : " released" << std::endl;
31
31
}
32
32
});
33
33
34
- wiimote->onAccelerometer([wiimote, &stream, name ](const Vector3& v) {
34
+ wiimote->onAccelerometer([wiimote](const Vector3& v) {
35
35
std::cout << "Accel: " << v.x << ", " << v.y << ", " << v.z << std::endl;
36
36
}, true);
37
37
38
38
39
- wiimote->onNunchuckAccelerometer([wiimote, &stream, name ](const Vector3& v) {
39
+ wiimote->onNunchuckAccelerometer([wiimote](const Vector3& v) {
40
40
std::cout << "Nunchuck Accel: " << v.x << ", " << v.y << ", " << v.z << std::endl;
41
41
}, true);
42
42
43
- wiimote->onMotionPlus([wiimote, &stream, name ](const Vector3& v) {
43
+ wiimote->onMotionPlus([wiimote](const Vector3& v) {
44
44
std::cout << "Motion Plus: " << v.x << ", " << v.y << ", " << v.z << std::endl;
45
45
}, true);
46
46
@@ -63,4 +63,4 @@ while (true) {
63
63
## Contact
64
64
Author: Tom Yaxley / _ tommtiytom at gmail dot com_
65
65
66
- Contributions, pull requests, bug reports and issues are welcome!
66
+ Contributions, pull requests, bug reports and issues are welcome!
0 commit comments