Heart Rate

Whether your heart’s stopped through fear, or is pounding from hours hiking at altitude, our heart rate sensors show what makes your ticker tick, and how fast it’s beating.

Why Measure Heart Rate?

One of our hidden metrics, showing a unique insight into the ride. Are you a stone cold professional where nothing fazes you, or a nervous wreck pulling off those 720s? Maybe your creation will try and calm the rider as their heart rate is pounding, or push it a bit higher to get the blood flowing.

#ifndef PUSHN8HEARTDEVICE_H
#define PUSHN8HEARTDEVICE_H

#include <QString>
#include <QObject>
#include “pushn8btdevice.h”

#include “npushhearttick.h”

class PushN8HeartDevice : public PushN8BtDevice
{
Q_OBJECT
public:
PushN8HeartDevice(QBtDevice a_device, QObject *parent = 0);

~PushN8HeartDevice();

public slots:
void gotDataReceived(QString);
};

#endif // PUSHN8HEARTDEVICE_H

#include “pushn8heartdevice.h”

PushN8HeartDevice::PushN8HeartDevice(QBtDevice a_device, QObject *parent) :
PushN8BtDevice(a_device, parent)
{
timerId = 0;
timerPeriod = 1000;

//Assumes messages are like: “HRM,80,75,90,END;”
packetLen = 5;
packetStart = “HRM”;
packetEnd = “END”;
}

PushN8HeartDevice::~PushN8HeartDevice()
{

}

void PushN8HeartDevice::gotDataReceived(QString data)
{
QStringList params;
if(getPackage(data, params))
{
int hr_3 = params[1].toInt();
int hr_2 = params[2].toInt();
int hr_1 = params[3].toInt();

NPushHeartTick * newHeartTick = new NPushHeartTick(hr_3, hr_2, hr_1);

//qDebug() << “Data received: ” << data;

if(receivers(SIGNAL(reading_ready(NPushLogTick*))) > 0)
{
//anyone listening to us
emit reading_ready(newHeartTick);
} else {
delete newHeartTick;
}
}
}

/*
* Copyright (c) 2011 Nokia Corporation
*
* This file is part of the Push Snowboarding Project, More info at:
* http://pushsnowboarding.com/tech/developer-centre/
*
* This file is under the GPLv3 License, more details at:
* http://www.gnu.org/licenses/
*
*/