Added BuiltInAccelerometer in Java and updated C++

Change-Id: I5a3360c51334e85da6a15fd640f9420bc3b64dca
This commit is contained in:
thomasclark
2014-07-21 10:07:46 -04:00
parent be106b3527
commit 6053a0cc24
7 changed files with 214 additions and 16 deletions

View File

@@ -6,13 +6,14 @@
#pragma once
#include "SensorBase.h"
#include "LiveWindow/LiveWindowSendable.h"
/**
* Built-in accelerometer.
*
* This class allows access to the RoboRIO's internal accelerometer.
*/
class BuiltInAccelerometer : public SensorBase
class BuiltInAccelerometer : public SensorBase, public LiveWindowSendable
{
public:
enum Range
@@ -22,9 +23,18 @@ public:
kRange_8G = 0x02,
};
BuiltInAccelerometer(Range range = kRange_2G);
virtual ~BuiltInAccelerometer();
BuiltInAccelerometer(Range range = kRange_8G);
virtual double GetX() const;
virtual double GetY() const;
virtual double GetZ() const;
virtual std::string GetSmartDashboardType();
virtual void InitTable(ITable *subtable);
virtual void UpdateTable();
virtual ITable* GetTable();
virtual void StartLiveWindowMode() {}
virtual void StopLiveWindowMode() {}
private:
ITable *m_table;
};