Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

67 lines (43 sloc) 1.125 kB
#ifndef SPINTOWINKID_H
#define SPINTOWINKID_H
#include <QDebug>
#include <QString>
#include <typeinfo>
#include "pushburtongenericdevice.h"
#include "npushairtimetick.h"
#include "pushn8airtimedetector.h"
#include "npushrotationstick.h"
#include "pushn8imudevice.h"
#include "npushimutick.h"
#define PRE_SPIN_BUFFER_SIZE 2
#define POS_SPIN_BUFFER_SIZE 2
/*
Chip offset:
-121,114,-39
-144,107,-32
-150,110,-32
*/
class RotationCounter : public PushBurtonGenericDevice
{
Q_OBJECT
public:
explicit RotationCounter(QObject *parent = 0);
~RotationCounter();
QString getName();
bool is_online();
bool subscribesToAny();//returns true..
//This function will return true when the given device is a AirTimeDetector or a Imu
bool subscribesTo(PushBurtonGenericDevice* deviceType);
signals:
public slots:
void incoming_reading(NPushLogTick *);
private:
void emitRotTick();
quint64 lastTstamp;
double spinAcc;
bool onAir;
int afterJumpDecCnter;
double pastSpinBuff[PRE_SPIN_BUFFER_SIZE];
unsigned int pastSpinBuffPt;
};
#endif // SPINTOWINKID_H
Jump to Line
Something went wrong with that request. Please try again.