Skip to content

Commit

Permalink
Working examples in File->Examples-RoveEncoder dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
JudahSchad committed Jan 31, 2019
1 parent f37b6b1 commit fecf900
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
22 changes: 11 additions & 11 deletions RoveUsDigiMa3Pwm.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// MRDT 2019 => Energia Texas Instruments Tiva C Todo...
// Last Updated Mrdt Spring 2019
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#include "RoveUsDigiMa3Pwm.h"
Expand All @@ -10,11 +10,11 @@

#include <stdint.h>

//////////////////////////////////////////////////////////////////////////
void RoveUsDigiMa3Pwm::attach( const uint8_t pin, const int priority )
{ this->EncoderCcpTimer.attach( pin, priority ); }
/////////////////////////////////////////////////////////////////////
void RoveUsDigiMa3Pwm::attach( uint8_t pin, int priority )
{ this->EncoderCcpTimer.attach( pin, priority ); }

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
int RoveUsDigiMa3Pwm::readMillidegrees()
{
int width_min_decipercent = 330; // todo => debug, then constants
Expand All @@ -31,19 +31,19 @@ int RoveUsDigiMa3Pwm::readMillidegrees()
float RoveUsDigiMa3Pwm::readRadians()
{ return DEG_TO_RAD * ( this->readMillidegrees() / 1000.0 ); } // Todo

//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////
void RoveUsDigiMa3Pwm::start() { this->EncoderCcpTimer.start(); }
void RoveUsDigiMa3Pwm::stop() { this->EncoderCcpTimer.stop(); }
bool RoveUsDigiMa3Pwm::isWireBroken() { return this->EncoderCcpTimer.isWireBroken(); }

/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////
void RoveUsDigiMa3PwmWireBreaks::attachMillis( uint8_t timer, int period_millis, int priority )
{ this->AllWireBreaksTimer.attachMillis( timer, period_millis, priority ); }
{ this->AllWireBreaksTimer.attachMillis( timer, period_millis, priority ); }

///////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
void RoveUsDigiMa3PwmWireBreaks::attachMicros( uint8_t timer, int period_micros, int priority )
{ this->AllWireBreaksTimer.attachMicros( timer, period_micros, priority ); }
{ this->AllWireBreaksTimer.attachMicros( timer, period_micros, priority ); }

//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
void RoveUsDigiMa3PwmWireBreaks::start() { this->AllWireBreaksTimer.start(); }
void RoveUsDigiMa3PwmWireBreaks::stop() { this->AllWireBreaksTimer.stop(); }
2 changes: 1 addition & 1 deletion RoveUsDigiMa3Pwm.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class RoveUsDigiMa3Pwm
{
public:
void attach( uint8_t pin, const int priority=7 );
void attach( uint8_t pin, int priority=7 );
void start();
void stop();

Expand Down
6 changes: 3 additions & 3 deletions examples/RoveUsDigiMa3Pwm/RoveUsDigiMa3Pwm.ino
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ void setup()
Encoder_TimerT4APinPM4.start();
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void debugPrint()
{
Serial.print( "Encoder_TimerT4APinPM4 angle degrees: "); Serial.println( Encoder_TimerT4APinPM4.readMillidegrees() / 1000.0 );
Serial.print( "Encoder_TimerT4APinPM4 angle radians: "); Serial.println( Encoder_TimerT4APinPM4.readRadians() );
Serial.print( "Encoder_TimerT4APinPM4 angle degrees: "); Serial.println( Encoder_TimerT4APinPM4.readMillidegrees() / 1000.0 );
Serial.print( "Encoder_TimerT4APinPM4 angle radians: "); Serial.println( Encoder_TimerT4APinPM4.readRadians() );
}

//////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name=RoveBoardTivaC
name=RoveEncoder
version=1.0.0
author=MST MRDT
maintainer=Judah <[email protected]>
Expand Down

0 comments on commit fecf900

Please sign in to comment.