Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/wiimote/src/external/wiicpp/wiic/motionplus.h @ 11504

Last change on this file since 11504 was 9780, checked in by georgr, 11 years ago

WiiCpp library successfully (?) added - won't work without libbluetooth-dev

  • Property svn:executable set to *
File size: 1.5 KB
RevLine 
[9780]1/*
2 *      motionplus.h
3 *
4 *      Written By:
5 *              Gabriele Randelli       
6 *              Email: < randelli (--AT--) dis [--DOT--] uniroma1 [--DOT--] it >
7 *
8 *      Copyright 2010
9 *
10 *      This file is part of wiiC.
11 *
12 *      This program is free software; you can redistribute it and/or modify
13 *      it under the terms of the GNU General Public License as published by
14 *      the Free Software Foundation; either version 3 of the License, or
15 *      (at your option) any later version.
16 *
17 *      This program is distributed in the hope that it will be useful,
18 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
19 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 *      GNU General Public License for more details.
21 *
22 *      You should have received a copy of the GNU General Public License
23 *      along with this program.  If not, see <http://www.gnu.org/licenses/>.
24 *
25 *      $Header$
26 *
27 */
28
29/**
30 *      @file
31 *      @brief Motion Plus expansion device.
32 */
33#ifndef MOTIONPLUS_H_INCLUDED
34#define MOTIONPLUS_H_INCLUDED
35
36#include "wiic_internal.h"
37#include <math.h>
38
39#define MP_SMOOTH_ALPHA 0.65f
40
41#ifdef __cplusplus
42extern "C" {
43#endif
44
45int motion_plus_handshake(struct wiimote_t* wm, byte* data, unsigned short len);
46
47void motion_plus_disconnected(struct motion_plus_t* mp);
48
49void motion_plus_event(struct motion_plus_t* mp, byte* msg);
50
51void wiic_set_mp_threshold(struct wiimote_t* wm, int threshold);
52
53void wiic_set_mp_smooth(struct wiimote_t* wm, int status, float alpha);
54
55void motion_plus_apply_smoothing(struct motion_plus_t* mp);
56
57#ifdef __cplusplus
58}
59#endif
60
61#endif // MOTIONPLUS_H_INCLUDED
Note: See TracBrowser for help on using the repository browser.