Skip to content
This repository has been archived by the owner on Oct 18, 2021. It is now read-only.

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
i-make-robots committed Feb 20, 2019
2 parents 0fe1ad9 + 32796f7 commit bd60986
Show file tree
Hide file tree
Showing 42 changed files with 3,471 additions and 2,613 deletions.
23 changes: 2 additions & 21 deletions MSerial.ino → MSerial.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
//------------------------------------------------------------------------------
// Makelangelo - firmware for various robot kinematic models
// [email protected] 2013-12-26
// Copyright at end of file. Please see
// http://www.github.com/MarginallyClever/makelangeloFirmware for more information.
// Please see http://www.github.com/MarginallyClever/makelangeloFirmware for more information.
//------------------------------------------------------------------------------

/*
Expand All @@ -29,22 +28,4 @@ void serial_setup(long baud) {
// serial receive interrupt
ISR(USART0_RX_vect) {
}
*/


/**
* This file is part of makelangelo-firmware.
*
* makelangelo-firmware is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* makelangelo-firmware is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with makelangelo-firmware. If not, see <http://www.gnu.org/licenses/>.
*/
*/
5 changes: 5 additions & 0 deletions MServo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@

#include "MServo.h"

#ifndef ESP8266

#define usToTicks(_us) (( clockCyclesPerMicrosecond()* _us) / 8) // converts microseconds to tick (assumes prescale of 8) // 12 Aug 2009
#define ticksToUs(_ticks) (( (unsigned)_ticks * 8)/ clockCyclesPerMicrosecond() ) // converts from ticks back to microseconds

Expand Down Expand Up @@ -333,3 +335,6 @@ bool Servo::attached()
{
return servos[this->servoIndex].Pin.isActive ;
}


#endif // ESP8266
14 changes: 9 additions & 5 deletions MServo.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
#ifndef Servo_h
#define Servo_h

#ifndef ESP8266

#include <avr/interrupt.h>
#include <Arduino.h>
#include <inttypes.h>
Expand Down Expand Up @@ -86,10 +88,10 @@ typedef enum { _timer3, _Nbr_16timers } timer16_Sequence_t ;
typedef enum { _timer3, _Nbr_16timers } timer16_Sequence_t ;

#else // everything else
//#define _useTimer1
#define _useTimer3
//typedef enum { _timer1, _Nbr_16timers } timer16_Sequence_t ;
typedef enum { _timer3, _Nbr_16timers } timer16_Sequence_t ;
#define _useTimer1
//#define _useTimer3
typedef enum { _timer1, _Nbr_16timers } timer16_Sequence_t ;
//typedef enum { _timer3, _Nbr_16timers } timer16_Sequence_t ;
#endif

#define Servo_VERSION 2 // software version of this library
Expand Down Expand Up @@ -132,4 +134,6 @@ class Servo
int8_t max; // maximum is this value times 4 added to MAX_PULSE_WIDTH
};

#endif
#endif // ESP8266

#endif // Servo_h
Loading

0 comments on commit bd60986

Please sign in to comment.