Now you can download a copy of these docs so you can use them offline! Download now
Accelerometer.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) FIRST 2008. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
5 /*----------------------------------------------------------------------------*/
6 
7 #ifndef ACCELEROMETER_H_
8 #define ACCELEROMETER_H_
9 
10 #include "AnalogChannel.h"
11 #include "SensorBase.h"
12 #include "PIDSource.h"
13 #include "LiveWindow/LiveWindowSendable.h"
14 
21 class Accelerometer : public SensorBase, public PIDSource, public LiveWindowSendable {
22 public:
23  explicit Accelerometer(uint32_t channel);
24  Accelerometer(uint8_t moduleNumber, uint32_t channel);
25  explicit Accelerometer(AnalogChannel *channel);
26  virtual ~Accelerometer();
27 
28  float GetAcceleration();
29  void SetSensitivity(float sensitivity);
30  void SetZero(float zero);
31  double PIDGet();
32 
33  void UpdateTable();
34  void StartLiveWindowMode();
35  void StopLiveWindowMode();
36  std::string GetSmartDashboardType();
37  void InitTable(ITable *subTable);
38  ITable * GetTable();
39 
40 private:
41  void InitAccelerometer();
42 
43  AnalogChannel *m_analogChannel;
44  float m_voltsPerG;
45  float m_zeroGVoltage;
46  bool m_allocatedChannel;
47 
48  ITable *m_table;
49 };
50 
51 #endif
Definition: ITable.h:26
void InitTable(ITable *subTable)
void StopLiveWindowMode()
void StartLiveWindowMode()
float GetAcceleration()
void SetZero(float zero)
virtual ~Accelerometer()
std::string GetSmartDashboardType()
ITable * GetTable()
void SetSensitivity(float sensitivity)
Accelerometer(uint32_t channel)

Generated on Sat Apr 26 2014 12:26:45 for WPILibC++ by doxygen 1.8.6