Skip to content

Commit

Permalink
Version 2.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ArminJo committed Apr 7, 2022
1 parent 0916d32 commit 78e2b3c
Show file tree
Hide file tree
Showing 60 changed files with 306 additions and 294 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ To customize the library to different requirements, there are some compile optio
These macros must be defined in your program before the line `#include <ServoEasing.hpp>` to take effect.<br/>
Modify them by enabling / disabling them, or change the values if applicable.

| Option | Default | Description |
| Name | Default value | Description |
|-|-|-|
| `USE_PCA9685_SERVO_EXPANDER` | disabled | Enables the use of the PCA9685 I2C expander chip/board. |
| `USE_SERVO_LIB` | disabled | Use of PCA9685 normally disables use of regular servo library. You can force additional using of regular servo library by defining `USE_SERVO_LIB`. See [below](https://github.com/ArminJo/ServoEasing#using-pca9685-16-channel-servo-expander). |
Expand Down
2 changes: 1 addition & 1 deletion examples/AsymmetricEasing/AsymmetricEasing.ino
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
*/

#include <Arduino.h>
Expand Down
2 changes: 1 addition & 1 deletion examples/AsymmetricEasing/PinDefinitionsAndMore.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
*
*/

Expand Down
2 changes: 1 addition & 1 deletion examples/CatMover/CatMover.ino
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
*
*/

Expand Down
2 changes: 1 addition & 1 deletion examples/CatMover/PinDefinitionsAndMore.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
*
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
*/

#include <Arduino.h>
Expand Down
2 changes: 1 addition & 1 deletion examples/ContinuousRotatingServo/PinDefinitionsAndMore.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
*
*/

Expand Down
2 changes: 1 addition & 1 deletion examples/EndPositionsTest/ADCUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
*/

#include "ADCUtils.h"
Expand Down
2 changes: 1 addition & 1 deletion examples/EndPositionsTest/ADCUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
*
*/

Expand Down
2 changes: 1 addition & 1 deletion examples/EndPositionsTest/EndPositionsTest.ino
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
*/

#include <Arduino.h>
Expand Down
2 changes: 1 addition & 1 deletion examples/EndPositionsTest/PinDefinitionsAndMore.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
*
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
*
*/

Expand Down
2 changes: 1 addition & 1 deletion examples/LightweightServoExample/PinDefinitionsAndMore.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
*
*/

Expand Down
2 changes: 1 addition & 1 deletion examples/OneServo/OneServo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
*/

#include <Arduino.h>
Expand Down
2 changes: 1 addition & 1 deletion examples/OneServo/PinDefinitionsAndMore.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
*
*/

Expand Down
2 changes: 1 addition & 1 deletion examples/PCA9685_Expander/PCA9685_Expander.ino
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
*/

#include <Arduino.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
*/

#include <Arduino.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
*/

#include <Arduino.h>
Expand Down
2 changes: 1 addition & 1 deletion examples/QuadrupedControl/ADCUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
*/

#include "ADCUtils.h"
Expand Down
2 changes: 1 addition & 1 deletion examples/QuadrupedControl/ADCUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
*
*/

Expand Down
2 changes: 1 addition & 1 deletion examples/QuadrupedControl/HCSR04.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
*
*/

Expand Down
2 changes: 1 addition & 1 deletion examples/QuadrupedControl/HCSR04.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
*
*/

Expand Down
2 changes: 1 addition & 1 deletion examples/QuadrupedControl/IRCommandDispatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
*/

#ifndef _IR_COMMAND_DISPATCHER_H
Expand Down
2 changes: 1 addition & 1 deletion examples/QuadrupedControl/IRCommandDispatcher.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
* along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
*/
#ifndef _IR_COMMAND_DISPATCHER_HPP
#define _IR_COMMAND_DISPATCHER_HPP
Expand Down
14 changes: 7 additions & 7 deletions examples/QuadrupedControl/IRCommandMapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@
* Select the one you have below.
*/

#ifndef IR_COMMAND_MAPPING_H_
#define IR_COMMAND_MAPPING_H_
#ifndef _IR_COMMAND_MAPPING_H
#define _IR_COMMAND_MAPPING_H

#include <Arduino.h>

#include "IRCommandDispatcher.h" // IR_COMMAND_FLAG_BLOCKING etc. are defined here
#include "QuadrupedControlCommands.h" // contains the command definitions used in the mapping table below
#include "QuadrupedHelper.h" // for additional commands
#include "QuadrupedNeoPixel.h" // for additional commands

/*
* !!! Choose your remote !!!
Expand Down Expand Up @@ -284,11 +287,9 @@
#endif

#if defined(USE_WHITE_DVD_REMOTE)
#include "QuadrupedNeoPixel.h" // for additional commands
#include "QuadrupedHelper.h" // for additional commands
# if defined(IR_REMOTE_NAME)
#error "Please choose only one remote for compile"
# elsef
# else
#define IR_REMOTE_NAME "WHITE_DVD"
#define HAS_ADDITIONAL_REMOTE_COMMANDS

Expand Down Expand Up @@ -477,6 +478,5 @@ COMMAND_STOP, IR_COMMAND_FLAG_IS_STOP_COMMAND, &doStop, stop }
#endif
};

#endif /* IR_COMMAND_MAPPING_H_ */

#endif // _IR_COMMAND_MAPPING_H
#pragma once
36 changes: 32 additions & 4 deletions examples/QuadrupedControl/QuadrupedBasicMovements.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,44 @@
* Author: Armin
*/

#ifndef QUADRUPED_BASIC_MOVEMENTS_H
#define QUADRUPED_BASIC_MOVEMENTS_H
#ifndef _QUADRUPED_BASIC_MOVEMENTS_H
#define _QUADRUPED_BASIC_MOVEMENTS_H

#include "QuadrupedServoConfiguration.h" // for MOVE_DIRECTION_FORWARD

#include <stdint.h>

extern volatile uint8_t sMovingDirection;

#if ! defined(QUADRUPED_MOVEMENT_BREAK_FLAG)
#define QUADRUPED_MOVEMENT_BREAK_FLAG false
#endif
#if ! defined(QUADRUPED_BREAK_IF_STOP)
#define QUADRUPED_BREAK_IF_STOP if (QUADRUPED_MOVEMENT_BREAK_FLAG) break
#endif
#if ! defined(QUADRUPED_RETURN_IF_STOP)
#define QUADRUPED_RETURN_IF_STOP if (QUADRUPED_MOVEMENT_BREAK_FLAG) return
#endif

/*
* Action type definitions
* Currently used for NeoPatterns display
*/
#define ACTION_TYPE_STOP 0
#define ACTION_TYPE_CREEP 1
#define ACTION_TYPE_TROT 2
#define ACTION_TYPE_TURN 3
#define ACTION_TYPE_TWIST 4
#define ACTION_TYPE_ATTENTION 5
#define ACTION_TYPE_LEAN 6
#define ACTION_TYPE_WAVE 7
// only used by UserCommands.cpp
#define ACTION_TYPE_DANCE 8
#define ACTION_TYPE_TEST 9
#define ACTION_TYPE_AUTO_MOVE 10
extern uint8_t sCurrentlyRunningAction; // A change on this action type triggers the generation of new neopatterns
extern uint8_t sLastActionTypeForNeopatternsDisplay; // do determine changes of sCurrentlyRunningAction

/*
* Movements
*/
Expand All @@ -24,6 +53,5 @@ void moveTurn(uint8_t aNumberOfTurns = 0); // 0 -> 256 turns
void moveTrot(uint8_t aNumberOfTrots = 0); // 0 -> 256 trots
void moveCreep(uint8_t aNumberOfCreeps = 0); // 0 -> 256 creeps

#endif /* QUADRUPED_BASIC_MOVEMENTS_H */

#endif // _QUADRUPED_BASIC_MOVEMENTS_H
#pragma once
Loading

0 comments on commit 78e2b3c

Please sign in to comment.