Pressure

Our pressure sensors are crucial to telling us not only if a rider’s weight is more over their heel edge or toe edge as they carve, but it can also show us increased pressure during take-off, the impact of landing and those precious moments of air time.

Why Measure Pressure?

Measuring both the rider’s shifts in weight on the board and time in the air, pressure is a hidden metric. Perhaps this data allows training feedback on technique, or you can log airtime to give you bragging rights at the bottom of the slope.

#ifndef PUSHN8FOOTDEVICE_H
#define PUSHN8FOOTDEVICE_H

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

#include “npushfoottick.h”

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

~PushN8FootDevice();

char get_side();

private:
char side;

public slots:
void gotDataReceived(QString);
};

#endif // PUSHN8FOOTDEVICE_H

#include “pushn8footdevice.h”

PushN8FootDevice::PushN8FootDevice(QBtDevice a_device, QObject *parent) :
PushN8BtDevice(a_device, parent)
{

if(device.getName().count(“FOOT_L”) > 0)
{
side = ‘L’;
} else if(device.getName().count(“FOOT_R”) > 0){
side = ‘R’;
} else {
side = ‘?’;
}

timerId = 0;
timerPeriod = 50;

// toes,heel
//Assumes messages are like: “FOOT,231,3123,END;”
packetLen = 4;
packetStart = “FOOT”;
packetEnd = “END”;

}

PushN8FootDevice::~PushN8FootDevice()
{
}

void PushN8FootDevice::gotDataReceived(QString data)
{

QStringList params;
if(getPackage(data, params))
{
int ntoes = params[1].toInt();
int nheel = params[2].toInt();

NPushFootTick * newFootTick = new NPushFootTick(side, ntoes, nheel);

qDebug() << “Foot data received: ” << ntoes << “, ” << nheel;

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

char PushN8FootDevice::get_side()
{
return side;
}

/*
* 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/
*
*/