Skip to content

Commit

Permalink
Released version v4.0.1 - Fixed an serious bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Giuseppe Masino committed Feb 28, 2018
1 parent 15a1d8c commit c3d0027
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 18 deletions.
8 changes: 7 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
[![Keep a Changelog specification badge](https://img.shields.io/badge/Keep%20a%20Changelog%20Specification-1.0.0-orange.svg)](http://keepachangelog.com)
[![Semantic Versioning specification badge](https://img.shields.io/badge/Semantic%20Versioning%20Specification-2.0.0-orange.svg)](http://semver.org)

## [4.0.0] - 2018-02-18 ##
## [4.0.1] - 2018-02-28 ##

## Fixed ##

- A bug that prevented the use of the library

## [4.0.0] - 2018-02-18 [YANKED] ##

### Added ###

Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=L293
version=4.0.0
version=4.0.1
author=Giuseppe Masino (qub1750ul)
maintainer=Giuseppe Masino (qub1750ul)
sentence=A library to control motors with the L293x motor driver and L298x compatible modules
Expand Down
10 changes: 4 additions & 6 deletions src/L293_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ class L293_base
{
public:

virtual ~L293_base() = 0;

inline void setPWMOffset( int16_t _PWMOffset ) ; ///< Applys an offset over the speed value of the motor
inline void stop() const ; ///< Stops the motor by power reduction
inline uint8_t getRawPWMDC() const ; ///< Returns the last set speed value without applying the offset
inline uint8_t getPWMDC() const ; ///< Return the effective last set speed value
void setPWMOffset( int16_t _PWMOffset ) ; ///< Applys an offset over the speed value of the motor
void stop() const ; ///< Stops the motor by power reduction
uint8_t getRawPWMDC() const ; ///< Returns the last set speed value without applying the offset
uint8_t getPWMDC() const ; ///< Return the effective last set speed value

virtual void forward( uint8_t PWMDC = 0 ) = 0 ;
virtual void back( uint8_t PWMDC = 0 ) = 0 ;
Expand Down
4 changes: 2 additions & 2 deletions src/L293_std.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

L293 :: L293( uint8_t _enablePin, uint8_t _forwardPin, uint8_t _reversePin, int16_t _PWMOffset )
{
enablePin = _enablePin;
enablePin = _enablePin;
forwardPin = _forwardPin;
reversePin = _reversePin;

pinMode( enablePin, OUTPUT );
pinMode( enablePin, OUTPUT );
pinMode( forwardPin, OUTPUT );
pinMode( reversePin, OUTPUT );

Expand Down
16 changes: 8 additions & 8 deletions src/L293_std.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ class L293 : public L293_base

L293( uint8_t _enablePin, uint8_t _forwardPin, uint8_t _reversePin, int16_t _speedOffset = 0 );

inline void forceStop( uint16_t handlingTime ); ///< Stops the motor by electrically braking it
inline bool isForceStopped() const ; ///< Tells the information about the motor that the name says

inline void forward( uint8_t _PWMDC = 0 ) override ; ///< Makes the motor to go forward and sets a new speed value
inline void back( uint8_t _PWMDC = 0 ) override ; ///< Makes the motor to go reverse and sets a new speed value
inline bool isForward() const override ; ///< Tells the information about the motor that the name says
inline bool isReverse() const override ; ///< Tells the information about the motor that the name says
inline bool isStopped() const override ; ///< Tells the information about the motor that the name says
void forceStop( uint16_t handlingTime ); ///< Stops the motor by electrically braking it
bool isForceStopped() const ; ///< Tells the information about the motor that the name says

void forward( uint8_t _PWMDC = 0 ) override ; ///< Makes the motor to go forward and sets a new speed value
void back( uint8_t _PWMDC = 0 ) override ; ///< Makes the motor to go reverse and sets a new speed value
bool isForward() const override ;
bool isReverse() const override ;
bool isStopped() const override ;

protected:

Expand Down

0 comments on commit c3d0027

Please sign in to comment.