Clean up comments and spacing
This commit is contained in:
commit
316469e76a
@ -1,30 +1,30 @@
|
||||
/* -*- c++ -*- */
|
||||
|
||||
/*
|
||||
Reprap firmware based on Sprinter and grbl.
|
||||
Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
This firmware is a mashup between Sprinter and grbl.
|
||||
(https://github.com/kliment/Sprinter)
|
||||
(https://github.com/simen/grbl/tree)
|
||||
|
||||
It has preliminary support for Matthew Roberts advance algorithm
|
||||
http://reprap.org/pipermail/reprap-dev/2011-May/003323.html
|
||||
/**
|
||||
* Marlin Firmware
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* About Marlin
|
||||
*
|
||||
* This firmware is a mashup between Sprinter and grbl.
|
||||
* - https://github.com/kliment/Sprinter
|
||||
* - https://github.com/simen/grbl/tree
|
||||
*
|
||||
* It has preliminary support for Matthew Roberts advance algorithm
|
||||
* - http://reprap.org/pipermail/reprap-dev/2011-May/003323.html
|
||||
*/
|
||||
|
||||
/* All the implementation is done in *.cpp files to get better compatibility with avr-gcc without the Arduino IDE */
|
||||
|
@ -3805,7 +3805,7 @@ inline void gcode_M81() {
|
||||
inline void gcode_M82() { axis_relative_modes[E_AXIS] = false; }
|
||||
|
||||
/**
|
||||
* M82: Set E codes relative while in Absolute Coordinates (G90) mode
|
||||
* M83: Set E codes relative while in Absolute Coordinates (G90) mode
|
||||
*/
|
||||
inline void gcode_M83() { axis_relative_modes[E_AXIS] = true; }
|
||||
|
||||
@ -6153,6 +6153,9 @@ void mesh_plan_buffer_line(float x, float y, float z, const float e, float feed_
|
||||
|
||||
/**
|
||||
* Prepare a single move and get ready for the next one
|
||||
*
|
||||
* (This may call plan_buffer_line several times to put
|
||||
* smaller moves into the planner for DELTA or SCARA.)
|
||||
*/
|
||||
void prepare_move() {
|
||||
clamp_to_software_endstops(destination);
|
||||
|
@ -135,4 +135,4 @@
|
||||
#define MSG_DELTA_CALIBRATE_CENTER "Калибровать Center"
|
||||
#endif // DELTA_CALIBRATION_MENU
|
||||
|
||||
#endif // LANGUAGE_RU_H
|
||||
#endif // LANGUAGE_RU_H
|
||||
|
@ -50,17 +50,14 @@
|
||||
|
||||
#ifdef NUM_SERVOS
|
||||
#define SERVO0_PIN -1
|
||||
|
||||
#if NUM_SERVOS > 1
|
||||
#define SERVO1_PIN -1
|
||||
#endif
|
||||
|
||||
#if NUM_SERVOS > 2
|
||||
#define SERVO2_PIN -1
|
||||
#endif
|
||||
|
||||
#if NUM_SERVOS > 3
|
||||
#define SERVO3_PIN -1
|
||||
#if NUM_SERVOS > 2
|
||||
#define SERVO2_PIN -1
|
||||
#if NUM_SERVOS > 3
|
||||
#define SERVO3_PIN -1
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -101,29 +101,29 @@ static inline void handle_interrupts(timer16_Sequence_t timer, volatile uint16_t
|
||||
#ifndef WIRING // Wiring pre-defines signal handlers so don't define any if compiling for the Wiring platform
|
||||
|
||||
// Interrupt handlers for Arduino
|
||||
#if defined(_useTimer1)
|
||||
#ifdef _useTimer1
|
||||
SIGNAL (TIMER1_COMPA_vect) { handle_interrupts(_timer1, &TCNT1, &OCR1A); }
|
||||
#endif
|
||||
|
||||
#if defined(_useTimer3)
|
||||
#ifdef _useTimer3
|
||||
SIGNAL (TIMER3_COMPA_vect) { handle_interrupts(_timer3, &TCNT3, &OCR3A); }
|
||||
#endif
|
||||
|
||||
#if defined(_useTimer4)
|
||||
#ifdef _useTimer4
|
||||
SIGNAL (TIMER4_COMPA_vect) { handle_interrupts(_timer4, &TCNT4, &OCR4A); }
|
||||
#endif
|
||||
|
||||
#if defined(_useTimer5)
|
||||
#ifdef _useTimer5
|
||||
SIGNAL (TIMER5_COMPA_vect) { handle_interrupts(_timer5, &TCNT5, &OCR5A); }
|
||||
#endif
|
||||
|
||||
#else //!WIRING
|
||||
|
||||
// Interrupt handlers for Wiring
|
||||
#if defined(_useTimer1)
|
||||
#ifdef _useTimer1
|
||||
void Timer1Service() { handle_interrupts(_timer1, &TCNT1, &OCR1A); }
|
||||
#endif
|
||||
#if defined(_useTimer3)
|
||||
#ifdef _useTimer3
|
||||
void Timer3Service() { handle_interrupts(_timer3, &TCNT3, &OCR3A); }
|
||||
#endif
|
||||
|
||||
@ -131,7 +131,7 @@ static inline void handle_interrupts(timer16_Sequence_t timer, volatile uint16_t
|
||||
|
||||
|
||||
static void initISR(timer16_Sequence_t timer) {
|
||||
#if defined(_useTimer1)
|
||||
#ifdef _useTimer1
|
||||
if (timer == _timer1) {
|
||||
TCCR1A = 0; // normal counting mode
|
||||
TCCR1B = _BV(CS11); // set prescaler of 8
|
||||
@ -144,31 +144,31 @@ static void initISR(timer16_Sequence_t timer) {
|
||||
TIFR1 |= _BV(OCF1A); // clear any pending interrupts;
|
||||
TIMSK1 |= _BV(OCIE1A); // enable the output compare interrupt
|
||||
#endif
|
||||
#if defined(WIRING)
|
||||
#ifdef WIRING
|
||||
timerAttach(TIMER1OUTCOMPAREA_INT, Timer1Service);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(_useTimer3)
|
||||
#ifdef _useTimer3
|
||||
if (timer == _timer3) {
|
||||
TCCR3A = 0; // normal counting mode
|
||||
TCCR3B = _BV(CS31); // set prescaler of 8
|
||||
TCNT3 = 0; // clear the timer count
|
||||
#if defined(__AVR_ATmega128__)
|
||||
#ifdef __AVR_ATmega128__
|
||||
TIFR |= _BV(OCF3A); // clear any pending interrupts;
|
||||
ETIMSK |= _BV(OCIE3A); // enable the output compare interrupt
|
||||
#else
|
||||
TIFR3 = _BV(OCF3A); // clear any pending interrupts;
|
||||
TIMSK3 = _BV(OCIE3A) ; // enable the output compare interrupt
|
||||
#endif
|
||||
#if defined(WIRING)
|
||||
#ifdef WIRING
|
||||
timerAttach(TIMER3OUTCOMPAREA_INT, Timer3Service); // for Wiring platform only
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(_useTimer4)
|
||||
#ifdef _useTimer4
|
||||
if (timer == _timer4) {
|
||||
TCCR4A = 0; // normal counting mode
|
||||
TCCR4B = _BV(CS41); // set prescaler of 8
|
||||
@ -178,7 +178,7 @@ static void initISR(timer16_Sequence_t timer) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(_useTimer5)
|
||||
#ifdef _useTimer5
|
||||
if (timer == _timer5) {
|
||||
TCCR5A = 0; // normal counting mode
|
||||
TCCR5B = _BV(CS51); // set prescaler of 8
|
||||
@ -191,7 +191,7 @@ static void initISR(timer16_Sequence_t timer) {
|
||||
|
||||
static void finISR(timer16_Sequence_t timer) {
|
||||
// Disable use of the given timer
|
||||
#if defined(WIRING)
|
||||
#ifdef WIRING
|
||||
if (timer == _timer1) {
|
||||
#if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
|
||||
TIMSK1
|
||||
|
Loading…
Reference in New Issue
Block a user