Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 77 lines (60 sloc) 2.069 kB
9a780fa Adding licenses to all source files and adding COPYING/LICENSE discla…
cpscotti authored
1 /*
2 * Copyright (c) 2011 Nokia Corporation
3 *
4 * This file is part of the Push Snowboarding Project, More info at:
5 * www.pushsnowboading.com
6 *
7 * Author: Clovis Scotti <scotti@ieee.org>
8 *
9 * This program is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation, either version 3 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 *
26 */
27
dfaf02e (cpscott) "Importing" PushBurton2
cpscotti authored
28 #include "pushn8imudevice.h"
29
30 PushN8IMUDevice::PushN8IMUDevice(QBtDevice a_device, QObject *parent) :
31 PushN8BtDevice(a_device, parent)
32 {
33 timerId = 0;
34 timerPeriod = 50;
35
36
37 //Assumes messages are like: "IMU,231,23,43,54,454,645,54,23,54,END;"
38 packetLen = 11;
39 packetStart = "IMU";
40 packetEnd = "END";
67a3004 Adding changes to use native confirm dialog (QMessageBox)
Clovis Scotti authored
41
dfaf02e (cpscott) "Importing" PushBurton2
cpscotti authored
42 }
43
44 PushN8IMUDevice::~PushN8IMUDevice()
45 {
46
47 }
48
49
50 void PushN8IMUDevice::gotDataReceived(QString data)
51 {
52
53 QStringList params;
54 if(getPackage(data, params))
55 {
56
57 NPushIMUTick * newIMUTick = new NPushIMUTick(params);
58
59 // qDebug() << "Parms: " << params[1] << "," << params[2] << "," << params[3];
60
61 if(receivers(SIGNAL(reading_ready(NPushLogTick*))) > 0)
62 {
63 //anyone listening to us
64 emit reading_ready(newIMUTick);
65 } else {
66 delete newIMUTick;
67 }
68 }
69
70 }
71
1855376 completing getName transition down the hierarchy; (was left in a stat…
Clovis Scotti authored
72
73 QString PushN8IMUDevice::getName()
74 {
75 return "push.n8.bt.imu";
76 }
Something went wrong with that request. Please try again.