Support for the CAN pneumatics module in C++ and Java

Change-Id: I2ccb1d13d1c5da00a99329c761b75a6c2b3ea56d
This commit is contained in:
thomasclark
2014-05-29 14:25:09 -04:00
parent 9b831ed34c
commit 980d52becc
19 changed files with 2286 additions and 91 deletions

View File

@@ -0,0 +1,55 @@
/*
* PCMCompressor.h
*/
#ifndef PCMCOMPRESSOR_H_
#define PCMCOMPRESSOR_H_
#include "HAL/HAL.h"
#include "SensorBase.h"
#include "tables/ITableListener.h"
#include "LiveWindow/LiveWindowSendable.h"
/**
* CAN pneumatic control module compressor
*
* Created on: May 28, 2014
* Author: Thomas Clark
*
*/
class PCMCompressor: public SensorBase, public LiveWindowSendable, public ITableListener {
public:
PCMCompressor(uint8_t module);
PCMCompressor();
~PCMCompressor();
void Start();
void Stop();
bool Enabled();
bool GetPressureSwitchValue();
float GetCompressorCurrent();
void SetClosedLoopControl(bool on);
bool GetClosedLoopControl();
void UpdateTable();
void StartLiveWindowMode();
void StopLiveWindowMode();
std::string GetSmartDashboardType();
void InitTable(ITable *subTable);
ITable *GetTable();
void ValueChanged(ITable* source, const std::string& key, EntryValue value, bool isNew);
protected:
void *m_pcm_pointer;
private:
void InitCompressor(uint8_t module);
void SetCompressor(bool on);
ITable *m_table;
};
#endif /* PCMCOMPRESSOR_H_ */