Skip to content
This repository
Browse code

solving obscure merge problems

  • Loading branch information...
commit e252bf598301906f0b15c9bdc85eca36903f1ace 2 parents 57fdf5f + 0b34f00
Clovis Peruchi Scotti cpscotti authored
2  PushBurton2/npushfoottick.cpp
@@ -90,7 +90,7 @@ void NPushFootTick::dump_to_xml(QXmlStreamWriter& xml) const
90 90
91 91 QString NPushFootTick::get_pretty_print() const
92 92 {
93   - return QString("Foot: [%1;%2;%3]")
  93 + return QString("Foot: [%1;T:%2;H:%3]")
94 94 .arg(QString(side))
95 95 .arg(QString::number(toes))
96 96 .arg(QString::number(heel));
158 PushBurton2/pushburtongenericdevice.cpp
... ... @@ -1,79 +1,79 @@
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   -
28   -#include "pushburtongenericdevice.h"
29   -
30   -PushBurtonGenericDevice::PushBurtonGenericDevice(QObject * parent) : QObject(parent)
31   -{
32   -}
33   -
34   -PushBurtonGenericDevice::~PushBurtonGenericDevice()
35   -{
36   -}
37   -
38   -void PushBurtonGenericDevice::start_readings()
39   -{
40   - if(timerId == 0)
41   - timerId = startTimer(timerPeriod);
42   -}
43   -
44   -void PushBurtonGenericDevice::stop_readings()
45   -{
46   - if(timerId != 0)
47   - killTimer(timerId);
48   - timerId = 0;
49   -}
50   -
51   -void PushBurtonGenericDevice::disconnect_from_backend()
52   -{
53   -}
54   -
55   -bool PushBurtonGenericDevice::subscribesTo(PushBurtonGenericDevice*)
56   -{
57   - return false;
58   -}
59   -
60   -bool PushBurtonGenericDevice::subscribesToAny()
61   -{
62   - return false;
63   -}
64   -
65   -void PushBurtonGenericDevice::incoming_reading(NPushLogTick *)
66   -{
67   -
68   -}
69   -
70   -bool PushBurtonGenericDevice::start_run()
71   -{
72   - return true;
73   -}
74   -
75   -
76   -bool PushBurtonGenericDevice::end_run()
77   -{
78   - return true;
79   -}
  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 +
  28 +#include "pushburtongenericdevice.h"
  29 +
  30 +PushBurtonGenericDevice::PushBurtonGenericDevice(QObject * parent) : QObject(parent)
  31 +{
  32 +}
  33 +
  34 +PushBurtonGenericDevice::~PushBurtonGenericDevice()
  35 +{
  36 +}
  37 +
  38 +void PushBurtonGenericDevice::start_readings()
  39 +{
  40 + if(timerId == 0)
  41 + timerId = startTimer(timerPeriod);
  42 +}
  43 +
  44 +void PushBurtonGenericDevice::stop_readings()
  45 +{
  46 + if(timerId != 0)
  47 + killTimer(timerId);
  48 + timerId = 0;
  49 +}
  50 +
  51 +void PushBurtonGenericDevice::disconnect_from_backend()
  52 +{
  53 +}
  54 +
  55 +bool PushBurtonGenericDevice::subscribesTo(PushBurtonGenericDevice*)
  56 +{
  57 + return false;
  58 +}
  59 +
  60 +bool PushBurtonGenericDevice::subscribesToAny()
  61 +{
  62 + return false;
  63 +}
  64 +
  65 +void PushBurtonGenericDevice::incoming_reading(NPushLogTick *)
  66 +{
  67 +
  68 +}
  69 +
  70 +bool PushBurtonGenericDevice::start_run()
  71 +{
  72 + return true;
  73 +}
  74 +
  75 +
  76 +bool PushBurtonGenericDevice::end_run()
  77 +{
  78 + return true;
  79 +}
174 PushBurton2/pushburtongenericdevice.h
... ... @@ -1,87 +1,87 @@
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   -
28   -#ifndef PUSHBURTONGENERICDEVICE_H
29   -#define PUSHBURTONGENERICDEVICE_H
30   -
31   -
32   -
33   -#include <QObject>
34   -#include <QString>
35   -//#include <QVector>
36   -#include "npushlogtick.h"
37   -#include "npushgenreport.h"
38   -
39   -/* This is the base class for all devices.
40   - * This adds to all its subclasses the following functionalities
41   - * Adds QObject basic functionality for all devices (emit/slots/signals)
42   - * Periodic timer for sensor pooling (subclasses assign period value to timerPeriod variable)
43   - * defines the common interface for all sensors
44   - */
45   -class PushBurtonGenericDevice : public QObject
46   -{
47   - Q_OBJECT
48   -public:
49   -
50   - PushBurtonGenericDevice(QObject * parent = 0);
51   -
52   - virtual ~PushBurtonGenericDevice() = 0;
53   -
54   - virtual QString get_description() = 0;
55   -
56   - virtual void start_readings();
57   - virtual void stop_readings();
58   -
59   - virtual bool is_online() = 0;
60   -
61   - virtual void disconnect_from_backend();
62   -
63   - virtual bool start_run();
64   - virtual bool end_run();
65   -
66   - virtual bool subscribesToAny();
67   - virtual bool subscribesTo(PushBurtonGenericDevice* deviceType);
68   -
69   -protected:
70   - int timerId;
71   - int timerPeriod;
72   -
73   -
74   -
75   -public slots:
76   - virtual void incoming_reading(NPushLogTick *);
77   -
78   -signals:
79   - void reading_ready(NPushLogTick *);
80   -
81   - void report_ready(NPushGenReport *);
82   -
83   - void connected();
84   - void disconnected();
85   -};
86   -
87   -#endif // PUSHBURTONGENERICDEVICE_H
  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 +
  28 +#ifndef PUSHBURTONGENERICDEVICE_H
  29 +#define PUSHBURTONGENERICDEVICE_H
  30 +
  31 +
  32 +
  33 +#include <QObject>
  34 +#include <QString>
  35 +//#include <QVector>
  36 +#include "npushlogtick.h"
  37 +#include "npushgenreport.h"
  38 +
  39 +/* This is the base class for all devices.
  40 + * This adds to all its subclasses the following functionalities
  41 + * Adds QObject basic functionality for all devices (emit/slots/signals)
  42 + * Periodic timer for sensor pooling (subclasses assign period value to timerPeriod variable)
  43 + * defines the common interface for all sensors
  44 + */
  45 +class PushBurtonGenericDevice : public QObject
  46 +{
  47 + Q_OBJECT
  48 +public:
  49 +
  50 + PushBurtonGenericDevice(QObject * parent = 0);
  51 +
  52 + virtual ~PushBurtonGenericDevice() = 0;
  53 +
  54 + virtual QString get_description() = 0;
  55 +
  56 + virtual void start_readings();
  57 + virtual void stop_readings();
  58 +
  59 + virtual bool is_online() = 0;
  60 +
  61 + virtual void disconnect_from_backend();
  62 +
  63 + virtual bool start_run();
  64 + virtual bool end_run();
  65 +
  66 + virtual bool subscribesToAny();
  67 + virtual bool subscribesTo(PushBurtonGenericDevice* deviceType);
  68 +
  69 +protected:
  70 + int timerId;
  71 + int timerPeriod;
  72 +
  73 +
  74 +
  75 +public slots:
  76 + virtual void incoming_reading(NPushLogTick *);
  77 +
  78 +signals:
  79 + void reading_ready(NPushLogTick *);
  80 +
  81 + void report_ready(NPushGenReport *);
  82 +
  83 + void connected();
  84 + void disconnected();
  85 +};
  86 +
  87 +#endif // PUSHBURTONGENERICDEVICE_H
7 PushBurton2/pushn8footdevice.cpp
@@ -61,8 +61,11 @@ void PushN8FootDevice::gotDataReceived(QString data)
61 61 QStringList params;
62 62 if(getPackage(data, params))
63 63 {
64   - int ntoes = params[1].toInt();
65   - int nheel = params[2].toInt();
  64 +// int ntoes = params[1].toInt();//Want to flip, this is it!
  65 +// int nheel = params[2].toInt();// THIS IS THE OLD SETUP
  66 +
  67 + int ntoes = params[2].toInt();//Want to flip, this is it!
  68 + int nheel = params[1].toInt();// THIS IS THE NEW SETUP for the v3 boxes
66 69
67 70 NPushFootTick * newFootTick = new NPushFootTick(side, ntoes, nheel);
68 71

0 comments on commit e252bf5

Please sign in to comment.
Something went wrong with that request. Please try again.