Skip to content

Commit

Permalink
Adding ClassDiagram.txt
Browse files Browse the repository at this point in the history
Adding FilesystemConventions.h which abstracts all the filesystem/OS-related naming problems
Adding pre-processor directives to disable ALL Bluetooth-related software if it is being compiled to another platform
(simulation is working fine under windows)

git-svn-id: http://www.cpscotti.com/pushsnowboarding@9 c819a03f-852d-4de4-a68c-c3ac47756727
  • Loading branch information
cpscotti committed Feb 1, 2011
1 parent 2a2a194 commit aa93184
Show file tree
Hide file tree
Showing 43 changed files with 229 additions and 132 deletions.
4 changes: 2 additions & 2 deletions PushBurton2/AbsNormFeetTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class PressurePointData
void update(int inVal)
{
rawVal = inVal;
maxVal = Max(inVal, maxVal);
minVal = Min(inVal, minVal);
maxVal = (inVal > maxVal)?inVal:maxVal;
minVal = (inVal < minVal)?inVal:minVal;
normVal = (inVal - minVal)*(1.0f/(maxVal-minVal));
}

Expand Down
36 changes: 36 additions & 0 deletions PushBurton2/ClassDiagram.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Push Snowboarding App Class Diagram
http://yuml.me/diagram/scruffy/class/
[PushBurtonGenericDevice]^[PushN8BtDevice],
[PushBurtonGenericDevice]^[PushN8PhoneAcc],
[PushBurtonGenericDevice]^[PushN8PhoneMag],
[PushBurtonGenericDevice]^[PushN8PhoneGPS],
[PushN8BtDevice]^[PushN8FootDevice],
[PushN8BtDevice]^[PushN8GSRDevice],
[PushN8BtDevice]^[PushN8HeartDevice],
[PushN8BtDevice]^[PushN8IMUDevice],
[PushBurtonGenericDevice]^[PushN8SimulationDevice],
[PushBurtonGenericDevice]^[PushN8AirTimeDetector],
[PushBurtonGenericDevice]^[PushN8AbsNormFeetDevice],
[PushDevicesHolder]<->[PushN8IMUDevice],
[PushDevicesHolder]<->[PushN8GSRDevice],
[PushDevicesHolder]<->[PushN8FootDevice],
[PushDevicesHolder]<->[PushN8HeartDevice],
[PushDevicesHolder]<->[PushN8SimulationDevice],
[PushDevicesHolder]<->[PushN8PhoneGPS],
[PushDevicesHolder]<->[PushN8PhoneAcc],
[PushDevicesHolder]<->[PushN8PhoneMag],
[PushDevicesHolder]<->[PushN8AbsNormFeetDevice],
[PushDevicesHolder]<->[PushN8AirTimeDetector],
[PushDevicesHolder]->[UbiqLogSaver],
[NPushLogTick]^[NPushAccTick],
[NPushLogTick]^[NPushMagTick],
[NPushLogTick]^[NPushGPSTick],
[NPushLogTick]^[NPushFootTick],
[NPushLogTick]^[NPushHeartTick],
[NPushLogTick]^[NPushGSRTick],
[NPushLogTick]^[NPushIMUTick],
[NPushLogTick]^[NPushAirTimeTick],
[NPushLogTick]^[NPushNormFeetTick],
[UbiqLogSaver]1+-*[NPushLogTick],
[PushDevicesHolder]->[NPushTickDisposer],
[NPushTickDisposer]1+-*[NPushLogTick],
15 changes: 15 additions & 0 deletions PushBurton2/FilesystemConventions.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#ifndef FILESYSTEMCONVENTIONS_H
#define FILESYSTEMCONVENTIONS_H

#ifdef Q_OS_SYMBIAN
#define FSC_RUNS_FOLDERS_ROOT "E:/"
#define FSC_FSYS_SLASH "/"
#else
#define FSC_RUNS_FOLDERS_ROOT "C:\\"
#define FSC_FSYS_SLASH "\\"
#endif

#define FSC_RUNS_PREFIX "NPBRun"
#define FSC_RUNS_FILTER "NPBRun*"

#endif // FILESYSTEMCONVENTIONS_H
92 changes: 46 additions & 46 deletions PushBurton2/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ==============================================================================
# Generated by qmake (2.01a) (Qt 4.6.3) on: qua 26. jan 15:07:04 2011
# Generated by qmake (2.01a) (Qt 4.6.3) on: ter 1. fev 15:30:02 2011
# This file is generated by qmake and should not be modified by the
# user.
# Name : Makefile
Expand Down Expand Up @@ -86,9 +86,9 @@ compiler_mifconv_clean:
${ZDIR}\resource\apps\PushBurton2.mif: images\burton_logo.svg
mifconv ${ZDIR}\resource\apps\PushBurton2.mif /c32 images\burton_logo.svg

compiler_moc_header_make_all: moc\moc_mainwindow.cpp moc\moc_graphicpixmapbt.cpp moc\moc_graphicsdeviceinfo.cpp moc\moc_graphicsconnmenu.cpp moc\moc_devicesmanager.cpp moc\moc_pushburtongenericdevice.cpp moc\moc_npushtickdisposer.cpp moc\moc_npushlogtick.cpp moc\moc_pushn8simulationdevice.cpp moc\moc_pushn8btdevice.cpp moc\moc_pushn8imudevice.cpp moc\moc_pushn8heartdevice.cpp moc\moc_pushn8gsrdevice.cpp moc\moc_pushn8footdevice.cpp moc\moc_pushn8phonemag.cpp moc\moc_pushn8phonegps.cpp moc\moc_pushn8phoneacc.cpp moc\moc_pushn8simplereportsgenerator.cpp moc\moc_pushn8airtimedetector.cpp moc\moc_pushn8absnormfeetdevice.cpp moc\moc_npushreportspeed.cpp moc\moc_npushreportheart.cpp moc\moc_npushreportgsr.cpp moc\moc_npushreportaltitude.cpp moc\moc_npushreportairtime.cpp moc\moc_runcontroldialog.cpp moc\moc_runmanager.cpp moc\moc_ubiqlogsaver.cpp moc\moc_graphicvarplot.cpp moc\moc_graphictextbt.cpp moc\moc_graphicsreportview.cpp moc\moc_graphicslidingdownbts.cpp moc\moc_graphicslidingdownbts.cpp moc\moc_liveview.cpp moc\moc_graphicssettings.cpp
compiler_moc_header_make_all: moc\moc_mainwindow.cpp moc\moc_graphicpixmapbt.cpp moc\moc_graphicsdeviceinfo.cpp moc\moc_graphicsconnmenu.cpp moc\moc_devicesmanager.cpp moc\moc_pushburtongenericdevice.cpp moc\moc_npushtickdisposer.cpp moc\moc_npushlogtick.cpp moc\moc_pushn8simulationdevice.cpp moc\moc_pushn8phonemag.cpp moc\moc_pushn8phonegps.cpp moc\moc_pushn8phoneacc.cpp moc\moc_pushn8simplereportsgenerator.cpp moc\moc_pushn8airtimedetector.cpp moc\moc_pushn8absnormfeetdevice.cpp moc\moc_npushreportspeed.cpp moc\moc_npushreportheart.cpp moc\moc_npushreportgsr.cpp moc\moc_npushreportaltitude.cpp moc\moc_npushreportairtime.cpp moc\moc_runcontroldialog.cpp moc\moc_runmanager.cpp moc\moc_ubiqlogsaver.cpp moc\moc_graphicvarplot.cpp moc\moc_graphictextbt.cpp moc\moc_graphicsreportview.cpp moc\moc_graphicslidingdownbts.cpp moc\moc_graphicslidingdownbts.cpp moc\moc_liveview.cpp moc\moc_graphicssettings.cpp moc\moc_pushn8btdevice.cpp moc\moc_pushn8imudevice.cpp moc\moc_pushn8heartdevice.cpp moc\moc_pushn8gsrdevice.cpp moc\moc_pushn8footdevice.cpp
compiler_moc_header_clean:
-$(DEL_FILE) moc\moc_mainwindow.cpp moc\moc_graphicpixmapbt.cpp moc\moc_graphicsdeviceinfo.cpp moc\moc_graphicsconnmenu.cpp moc\moc_devicesmanager.cpp moc\moc_pushburtongenericdevice.cpp moc\moc_npushtickdisposer.cpp moc\moc_npushlogtick.cpp moc\moc_pushn8simulationdevice.cpp moc\moc_pushn8btdevice.cpp moc\moc_pushn8imudevice.cpp moc\moc_pushn8heartdevice.cpp moc\moc_pushn8gsrdevice.cpp moc\moc_pushn8footdevice.cpp moc\moc_pushn8phonemag.cpp moc\moc_pushn8phonegps.cpp moc\moc_pushn8phoneacc.cpp moc\moc_pushn8simplereportsgenerator.cpp moc\moc_pushn8airtimedetector.cpp moc\moc_pushn8absnormfeetdevice.cpp moc\moc_npushreportspeed.cpp moc\moc_npushreportheart.cpp moc\moc_npushreportgsr.cpp moc\moc_npushreportaltitude.cpp moc\moc_npushreportairtime.cpp moc\moc_runcontroldialog.cpp moc\moc_runmanager.cpp moc\moc_ubiqlogsaver.cpp moc\moc_graphicvarplot.cpp moc\moc_graphictextbt.cpp moc\moc_graphicsreportview.cpp moc\moc_graphicslidingdownbts.cpp moc\moc_graphicslidingdownbts.cpp moc\moc_liveview.cpp moc\moc_graphicssettings.cpp 2> NUL
-$(DEL_FILE) moc\moc_mainwindow.cpp moc\moc_graphicpixmapbt.cpp moc\moc_graphicsdeviceinfo.cpp moc\moc_graphicsconnmenu.cpp moc\moc_devicesmanager.cpp moc\moc_pushburtongenericdevice.cpp moc\moc_npushtickdisposer.cpp moc\moc_npushlogtick.cpp moc\moc_pushn8simulationdevice.cpp moc\moc_pushn8phonemag.cpp moc\moc_pushn8phonegps.cpp moc\moc_pushn8phoneacc.cpp moc\moc_pushn8simplereportsgenerator.cpp moc\moc_pushn8airtimedetector.cpp moc\moc_pushn8absnormfeetdevice.cpp moc\moc_npushreportspeed.cpp moc\moc_npushreportheart.cpp moc\moc_npushreportgsr.cpp moc\moc_npushreportaltitude.cpp moc\moc_npushreportairtime.cpp moc\moc_runcontroldialog.cpp moc\moc_runmanager.cpp moc\moc_ubiqlogsaver.cpp moc\moc_graphicvarplot.cpp moc\moc_graphictextbt.cpp moc\moc_graphicsreportview.cpp moc\moc_graphicslidingdownbts.cpp moc\moc_graphicslidingdownbts.cpp moc\moc_liveview.cpp moc\moc_graphicssettings.cpp moc\moc_pushn8btdevice.cpp moc\moc_pushn8imudevice.cpp moc\moc_pushn8heartdevice.cpp moc\moc_pushn8gsrdevice.cpp moc\moc_pushn8footdevice.cpp 2> NUL
moc\moc_mainwindow.cpp: pushburtonanimation.h \
graphicpixmapbt.h \
graphicsdeviceinfo.h \
Expand Down Expand Up @@ -213,44 +213,6 @@ moc\moc_pushn8simulationdevice.cpp: pushburtongenericdevice.h \
pushn8simulationdevice.h
C:\NokiaQtSDK\Symbian\SDK\bin\moc.exe $(DEFINES) $(INCPATH) -DSYMBIAN pushn8simulationdevice.h -o moc\moc_pushn8simulationdevice.cpp

moc\moc_pushn8btdevice.cpp: pushburtongenericdevice.h \
npushlogtick.h \
npushgenreport.h \
pushn8btdevice.h
C:\NokiaQtSDK\Symbian\SDK\bin\moc.exe $(DEFINES) $(INCPATH) -DSYMBIAN pushn8btdevice.h -o moc\moc_pushn8btdevice.cpp

moc\moc_pushn8imudevice.cpp: pushn8btdevice.h \
pushburtongenericdevice.h \
npushlogtick.h \
npushgenreport.h \
npushimutick.h \
pushn8imudevice.h
C:\NokiaQtSDK\Symbian\SDK\bin\moc.exe $(DEFINES) $(INCPATH) -DSYMBIAN pushn8imudevice.h -o moc\moc_pushn8imudevice.cpp

moc\moc_pushn8heartdevice.cpp: pushn8btdevice.h \
pushburtongenericdevice.h \
npushlogtick.h \
npushgenreport.h \
npushhearttick.h \
pushn8heartdevice.h
C:\NokiaQtSDK\Symbian\SDK\bin\moc.exe $(DEFINES) $(INCPATH) -DSYMBIAN pushn8heartdevice.h -o moc\moc_pushn8heartdevice.cpp

moc\moc_pushn8gsrdevice.cpp: pushn8btdevice.h \
pushburtongenericdevice.h \
npushlogtick.h \
npushgenreport.h \
npushgsrtick.h \
pushn8gsrdevice.h
C:\NokiaQtSDK\Symbian\SDK\bin\moc.exe $(DEFINES) $(INCPATH) -DSYMBIAN pushn8gsrdevice.h -o moc\moc_pushn8gsrdevice.cpp

moc\moc_pushn8footdevice.cpp: pushn8btdevice.h \
pushburtongenericdevice.h \
npushlogtick.h \
npushgenreport.h \
npushfoottick.h \
pushn8footdevice.h
C:\NokiaQtSDK\Symbian\SDK\bin\moc.exe $(DEFINES) $(INCPATH) -DSYMBIAN pushn8footdevice.h -o moc\moc_pushn8footdevice.cpp

moc\moc_pushn8phonemag.cpp: pushburtongenericdevice.h \
npushlogtick.h \
npushgenreport.h \
Expand Down Expand Up @@ -434,6 +396,44 @@ moc\moc_graphicssettings.cpp: graphictextbt.h \
graphicssettings.h
C:\NokiaQtSDK\Symbian\SDK\bin\moc.exe $(DEFINES) $(INCPATH) -DSYMBIAN graphicssettings.h -o moc\moc_graphicssettings.cpp

moc\moc_pushn8btdevice.cpp: pushburtongenericdevice.h \
npushlogtick.h \
npushgenreport.h \
pushn8btdevice.h
C:\NokiaQtSDK\Symbian\SDK\bin\moc.exe $(DEFINES) $(INCPATH) -DSYMBIAN pushn8btdevice.h -o moc\moc_pushn8btdevice.cpp

moc\moc_pushn8imudevice.cpp: pushn8btdevice.h \
pushburtongenericdevice.h \
npushlogtick.h \
npushgenreport.h \
npushimutick.h \
pushn8imudevice.h
C:\NokiaQtSDK\Symbian\SDK\bin\moc.exe $(DEFINES) $(INCPATH) -DSYMBIAN pushn8imudevice.h -o moc\moc_pushn8imudevice.cpp

moc\moc_pushn8heartdevice.cpp: pushn8btdevice.h \
pushburtongenericdevice.h \
npushlogtick.h \
npushgenreport.h \
npushhearttick.h \
pushn8heartdevice.h
C:\NokiaQtSDK\Symbian\SDK\bin\moc.exe $(DEFINES) $(INCPATH) -DSYMBIAN pushn8heartdevice.h -o moc\moc_pushn8heartdevice.cpp

moc\moc_pushn8gsrdevice.cpp: pushn8btdevice.h \
pushburtongenericdevice.h \
npushlogtick.h \
npushgenreport.h \
npushgsrtick.h \
pushn8gsrdevice.h
C:\NokiaQtSDK\Symbian\SDK\bin\moc.exe $(DEFINES) $(INCPATH) -DSYMBIAN pushn8gsrdevice.h -o moc\moc_pushn8gsrdevice.cpp

moc\moc_pushn8footdevice.cpp: pushn8btdevice.h \
pushburtongenericdevice.h \
npushlogtick.h \
npushgenreport.h \
npushfoottick.h \
pushn8footdevice.h
C:\NokiaQtSDK\Symbian\SDK\bin\moc.exe $(DEFINES) $(INCPATH) -DSYMBIAN pushn8footdevice.h -o moc\moc_pushn8footdevice.cpp

compiler_rcc_make_all: rcc\qrc_push_art.cpp
compiler_rcc_clean:
-$(DEL_FILE) rcc\qrc_push_art.cpp 2> NUL
Expand Down Expand Up @@ -536,11 +536,6 @@ generated_sources: \
moc\moc_npushtickdisposer.cpp \
moc\moc_npushlogtick.cpp \
moc\moc_pushn8simulationdevice.cpp \
moc\moc_pushn8btdevice.cpp \
moc\moc_pushn8imudevice.cpp \
moc\moc_pushn8heartdevice.cpp \
moc\moc_pushn8gsrdevice.cpp \
moc\moc_pushn8footdevice.cpp \
moc\moc_pushn8phonemag.cpp \
moc\moc_pushn8phonegps.cpp \
moc\moc_pushn8phoneacc.cpp \
Expand All @@ -561,6 +556,11 @@ generated_sources: \
moc\moc_graphicslidingdownbts.cpp \
moc\moc_liveview.cpp \
moc\moc_graphicssettings.cpp \
moc\moc_pushn8btdevice.cpp \
moc\moc_pushn8imudevice.cpp \
moc\moc_pushn8heartdevice.cpp \
moc\moc_pushn8gsrdevice.cpp \
moc\moc_pushn8footdevice.cpp \
rcc\qrc_push_art.cpp

all_source_deps: \
Expand Down
2 changes: 1 addition & 1 deletion PushBurton2/Makefile_0xece639d4.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ==============================================================================
# Generated by qmake (2.01a) (Qt 4.6.3) on: qua 26. jan 15:07:04 2011
# Generated by qmake (2.01a) (Qt 4.6.3) on: ter 1. fev 15:30:02 2011
# This file is generated by qmake and should not be modified by the
# user.
# Name : Makefile_0xece639d4.mk
Expand Down
32 changes: 20 additions & 12 deletions PushBurton2/PushBurton2.pro
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ SOURCES += main.cpp\
npushairtimetick.cpp \
npushacctick.cpp \
npushgenreport.cpp \
pushn8btdevice.cpp \
pushn8imudevice.cpp \
pushn8heartdevice.cpp \
pushn8gsrdevice.cpp \
pushn8footdevice.cpp \
pushn8phonemag.cpp \
pushn8phonegps.cpp \
pushn8phoneacc.cpp \
Expand Down Expand Up @@ -105,11 +100,6 @@ HEADERS += mainwindow.h \
npushacctick.h \
AbsNormFeetTypes.h \
npushgenreport.h \
pushn8btdevice.h \
pushn8imudevice.h \
pushn8heartdevice.h \
pushn8gsrdevice.h \
pushn8footdevice.h \
pushn8phonemag.h \
pushn8phonegps.h \
pushn8phoneacc.h \
Expand All @@ -132,15 +122,16 @@ HEADERS += mainwindow.h \
graphicslidingdownbts.h \
graphicslidingdownbts.h \
liveview.h \
graphicssettings.h
graphicssettings.h \
FilesystemConventions.h

FORMS += mainwindow.ui \
liveview.ui

CONFIG += mobility
MOBILITY = location sensors

LIBS += -lQBluetooth
#LIBS += -lQBluetooth

symbian {
TARGET.UID3 = 0xece639d4
Expand All @@ -166,6 +157,20 @@ symbian {
WriteUserData \
Location

HEADERS += \
pushn8btdevice.h \
pushn8imudevice.h \
pushn8heartdevice.h \
pushn8gsrdevice.h \
pushn8footdevice.h

SOURCES += \
pushn8btdevice.cpp \
pushn8imudevice.cpp \
pushn8heartdevice.cpp \
pushn8gsrdevice.cpp \
pushn8footdevice.cpp

addFiles.sources = $(EPOCROOT)Epoc32/release/$(PLATFORM)/$(CFG)/QBluetooth.dll
addFiles.path = /sys/bin
DEPLOYMENT += addFiles
Expand All @@ -175,3 +180,6 @@ symbian {

RESOURCES += \
push_art.qrc

#OTHER_FILES += \
# ClassDiagram.txt
2 changes: 1 addition & 1 deletion PushBurton2/bld.inf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ============================================================================
// * Makefile for building: PushBurton2
// * Generated by qmake (2.01a) (Qt 4.6.3) on: 2011-01-26T15:07:04
// * Generated by qmake (2.01a) (Qt 4.6.3) on: 2011-02-01T15:30:02
// * This file is generated by qmake and should not be modified by the
// * user.
// * Project: PushBurton2.pro
Expand Down
15 changes: 13 additions & 2 deletions PushBurton2/devicesmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@
DevicesManager::DevicesManager(PushDevicesHolder * aDevHolder, QObject *parent) :
QObject(parent), configuredDevices(aDevHolder)
{

#ifdef Q_OS_SYMBIAN
deviceDiscoverer = 0;
#endif

searching = false;

auto_connect = true;
Expand All @@ -47,14 +51,16 @@ DevicesManager::DevicesManager(PushDevicesHolder * aDevHolder, QObject *parent)

DevicesManager::~DevicesManager()
{
#ifdef Q_OS_SYMBIAN
if(deviceDiscoverer)
delete deviceDiscoverer;

unknownFoundDevices.clear();
#endif
}

void DevicesManager::start_bt_search()
{
#ifdef Q_OS_SYMBIAN
if(!searching)
{
searching = true;
Expand All @@ -68,8 +74,10 @@ void DevicesManager::start_bt_search()
deviceDiscoverer->startDiscovery();
qDebug() << "Bluetooth Discovery started";
}
#endif
}

#ifdef Q_OS_SYMBIAN
void DevicesManager::deviceFound(QBtDevice newDevice)
{
QString devName = newDevice.getName();
Expand Down Expand Up @@ -185,17 +193,20 @@ bool DevicesManager::IsDeviceNovell(QBtDevice dev)
return false;
}
}

return true;
}

#endif

void DevicesManager::stop_bt_search()
{
#ifdef Q_OS_SYMBIAN
if(searching)
{
searching = false;
deviceDiscoverer->stopDiscovery();
}
#endif
}

void DevicesManager::switch_to_simulation_device()
Expand Down
10 changes: 10 additions & 0 deletions PushBurton2/devicesmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#include <QObject>
#include <QDebug>

//Headers only necessary when bluetooth is available/on symbian device
#ifdef Q_OS_SYMBIAN
#include <QBluetooth/QBtDevice.h>
#include <QBluetooth/QBtService.h>
#include <QBluetooth/QBtConstants.h>
Expand All @@ -39,15 +41,19 @@
#include <QBluetooth/QBtServiceDiscoverer.h>
#include <QBluetooth/QBtSerialPortClient.h>
#include <QBluetooth/QBtLocalDevice.h>
#endif

#include <QSignalMapper>

#include "pushdevicesholder.h"

#ifdef Q_OS_SYMBIAN
#include "pushn8btdevice.h"
#include "pushn8footdevice.h"
#include "pushn8gsrdevice.h"
#include "pushn8imudevice.h"
#include "pushn8heartdevice.h"
#endif

#include "pushn8phoneacc.h"
#include "pushn8phonegps.h"
Expand Down Expand Up @@ -99,7 +105,9 @@ class DevicesManager : public QObject
public slots:

//inner mechanisms
#ifdef Q_OS_SYMBIAN
void deviceFound(QBtDevice);
#endif

//comm with user app
void start_bt_search();
Expand All @@ -121,11 +129,13 @@ public slots:
QSignalMapper connectedMapper;
QSignalMapper disconnectedMapper;

#ifdef Q_OS_SYMBIAN
QVector<QBtDevice> unknownFoundDevices;
QBtDeviceDiscoverer * deviceDiscoverer;

bool SetupDevice(QBtDevice);
bool IsDeviceNovell(QBtDevice);
#endif

void SetupPhoneDevices();
void SetupAbstractDevices();
Expand Down
Loading

0 comments on commit aa93184

Please sign in to comment.