Changed AnalogChannel to AnalogInput, added AnalogOutput for MXP

Change-Id: I863d89c61ff2cf4a7a3aeeca1296978e728758b6
This commit is contained in:
thomasclark
2014-06-12 18:07:45 -04:00
parent a46c246587
commit 3538e2c05c
32 changed files with 658 additions and 268 deletions

View File

@@ -5,7 +5,7 @@
/*----------------------------------------------------------------------------*/
#include "Gyro.h"
#include "AnalogChannel.h"
#include "AnalogInput.h"
#include "AnalogModule.h"
//#include "NetworkCommunication/UsageReporting.h"
#include "Timer.h"
@@ -78,7 +78,7 @@ void Gyro::InitGyro()
*/
Gyro::Gyro(uint8_t moduleNumber, uint32_t channel)
{
m_analog = new AnalogChannel(moduleNumber, channel);
m_analog = new AnalogInput(moduleNumber, channel);
m_channelAllocated = true;
InitGyro();
}
@@ -92,7 +92,7 @@ Gyro::Gyro(uint8_t moduleNumber, uint32_t channel)
*/
Gyro::Gyro(uint32_t channel)
{
m_analog = new AnalogChannel(channel);
m_analog = new AnalogInput(channel);
m_channelAllocated = true;
InitGyro();
}
@@ -100,10 +100,10 @@ Gyro::Gyro(uint32_t channel)
/**
* Gyro constructor with a precreated analog channel object.
* Use this constructor when the analog channel needs to be shared. There
* is no reference counting when an AnalogChannel is passed to the gyro.
* @param channel The AnalogChannel object that the gyro is connected to.
* is no reference counting when an AnalogInput is passed to the gyro.
* @param channel The AnalogInput object that the gyro is connected to.
*/
Gyro::Gyro(AnalogChannel *channel)
Gyro::Gyro(AnalogInput *channel)
{
m_analog = channel;
m_channelAllocated = false;
@@ -117,7 +117,7 @@ Gyro::Gyro(AnalogChannel *channel)
}
}
Gyro::Gyro(AnalogChannel &channel)
Gyro::Gyro(AnalogInput &channel)
{
m_analog = &channel;
m_channelAllocated = false;