Repetier-Firmware  0.91
src/ArduinoAVR/Repetier/Repetier.h File Reference
#include "Configuration.h"
#include "HAL.h"
#include "gcode.h"
#include "ui.h"
#include "Communication.h"
#include "Extruder.h"
#include "Printer.h"
#include "motion.h"
#include "Commands.h"
#include "Eeprom.h"

Go to the source code of this file.

Data Structures

class  RMath

Defines

#define REPETIER_VERSION   "0.91"
#define INCLUDE_DEBUG_COMMUNICATION
#define INCLUDE_DEBUG_NO_MOVE
#define DEBUG_COM_ERRORS
 print ops related debug info.
#define ANALYZER_CH0   63
#define ANALYZER_CH1   40
#define ANALYZER_CH2   53
#define ANALYZER_CH3   65
#define ANALYZER_CH4   59
#define ANALYZER_CH5   64
#define ANALYZER_CH6   58
#define ANALYZER_CH7   57
#define ANALYZER_ON(a)
#define ANALYZER_OFF(a)
#define X_AXIS   0
#define Y_AXIS   1
#define Z_AXIS   2
#define E_AXIS   3
#define VIRTUAL_AXIS   4
#define ANALOG_INPUT_BITS   10
#define ANALOG_INPUT_SAMPLE   5
#define ANALOG_REF_AREF   0
#define ANALOG_REF_AVCC   _BV(REFS0)
#define ANALOG_REF_INT_1_1   _BV(REFS1)
#define ANALOG_REF_INT_2_56   _BV(REFS0) | _BV(REFS1)
#define ANALOG_REF   ANALOG_REF_AVCC
#define MICROSTEP1   LOW,LOW
#define MICROSTEP2   HIGH,LOW
#define MICROSTEP4   LOW,HIGH
#define MICROSTEP8   HIGH,HIGH
#define MICROSTEP16   HIGH,HIGH
#define HOME_ORDER_XYZ   1
#define HOME_ORDER_XZY   2
#define HOME_ORDER_YXZ   3
#define HOME_ORDER_YZX   4
#define HOME_ORDER_ZXY   5
#define HOME_ORDER_ZYX   6
#define TEMP_PID   true
#define SPEED_MIN_MILLIS   300
#define SPEED_MAX_MILLIS   50
#define SPEED_MAGNIFICATION   100.0f
#define NONLINEAR_SYSTEM   false
#define MANUAL_CONTROL   true
#define MM_PER_ARC_SEGMENT_BIG   MM_PER_ARC_SEGMENT
#define N_ARC_CORRECTION   25
#define EXT0_ANALOG_INPUTS   1
#define EXT0_SENSOR_INDEX   0
#define EXT0_ANALOG_CHANNEL   EXT0_TEMPSENSOR_PIN
#define ACCOMMA0   ,
#define ACCOMMA1   ACCOMMA0
#define EXT1_ANALOG_INPUTS   0
#define EXT1_SENSOR_INDEX   EXT1_TEMPSENSOR_PIN
#define EXT1_ANALOG_CHANNEL
#define ACCOMMA2   ACCOMMA1
#define EXT2_ANALOG_INPUTS   0
#define EXT2_SENSOR_INDEX   EXT2_TEMPSENSOR_PIN
#define EXT2_ANALOG_CHANNEL
#define ACCOMMA3   ACCOMMA2
#define EXT3_ANALOG_INPUTS   0
#define EXT3_SENSOR_INDEX   EXT3_TEMPSENSOR_PIN
#define EXT3_ANALOG_CHANNEL
#define ACCOMMA4   ACCOMMA3
#define EXT4_ANALOG_INPUTS   0
#define EXT4_SENSOR_INDEX   EXT4_TEMPSENSOR_PIN
#define EXT4_ANALOG_CHANNEL
#define ACCOMMA5   ACCOMMA4
#define EXT5_ANALOG_INPUTS   0
#define EXT5_SENSOR_INDEX   EXT5_TEMPSENSOR_PIN
#define EXT5_ANALOG_CHANNEL
#define BED_ANALOG_INPUTS   1
#define BED_SENSOR_INDEX   EXT0_ANALOG_INPUTS+EXT1_ANALOG_INPUTS+EXT2_ANALOG_INPUTS+EXT3_ANALOG_INPUTS+EXT4_ANALOG_INPUTS+EXT5_ANALOG_INPUTS
#define BED_ANALOG_CHANNEL   ACCOMMA5 HEATED_BED_SENSOR_PIN
#define KOMMA   ,
#define DEBUG_MEMORY
#define ANALOG_INPUTS   (EXT0_ANALOG_INPUTS+EXT1_ANALOG_INPUTS+EXT2_ANALOG_INPUTS+EXT3_ANALOG_INPUTS+EXT4_ANALOG_INPUTS+EXT5_ANALOG_INPUTS+BED_ANALOG_INPUTS)
 number of analog input signals. Normally 1 for each temperature sensor
#define ANALOG_INPUT_CHANNELS   {EXT0_ANALOG_CHANNEL EXT1_ANALOG_CHANNEL EXT2_ANALOG_CHANNEL EXT3_ANALOG_CHANNEL EXT4_ANALOG_CHANNEL EXT5_ANALOG_CHANNEL BED_ANALOG_CHANNEL}
#define MENU_MODE_SD_MOUNTED   1
#define MENU_MODE_SD_PRINTING   2
#define MENU_MODE_SD_PAUSED   4
#define MENU_MODE_FAN_RUNNING   8
#define MAX_VFAT_ENTRIES   (2)
#define LONG_FILENAME_LENGTH   (13*MAX_VFAT_ENTRIES+1)
#define SD_MAX_FOLDER_DEPTH   2
#define uint   uint16_t
#define uint8   uint8_t
#define int8   int8_t
#define uint32   uint32_t
#define int32   int32_t
#define IGNORE_COORDINATE   99999
#define STR(s)   #s
#define XSTR(s)   STR(s)

Functions

void manage_inactivity (uint8_t debug)
void finishNextSegment ()
void linear_move (long steps_remaining[])
void setupTimerInterrupt ()
void motorCurrentControlInit ()
void microstepInit ()
void writeMonitor ()
 Writes monitored temperatures.
void updateStepsParameter (PrintLine *p)

Variables

const uint8 osAnalogInputChannels[] PROGMEM
uint8 osAnalogInputCounter [ANALOG_INPUTS]
uint osAnalogInputBuildup [ANALOG_INPUTS]
uint8 osAnalogInputPos
volatile uint osAnalogInputValues [ANALOG_INPUTS]
uint8_t pwm_pos [NUM_EXTRUDER+3]
int maxadv
int maxadv2
float maxadvspeed
millis_t previousMillisCmd
millis_t maxInactiveTime
millis_t stepperInactiveTime
long baudrate
 Communication speed rate.
unsigned int counterPeriodical
volatile uint8_t executePeriodical
uint8_t counter250ms
volatile int waitRelax

Define Documentation

#define ACCOMMA0   ,
#define ACCOMMA1   ACCOMMA0
#define ACCOMMA2   ACCOMMA1
#define ACCOMMA3   ACCOMMA2
#define ACCOMMA4   ACCOMMA3
#define ACCOMMA5   ACCOMMA4
#define ANALOG_INPUT_BITS   10
#define ANALOG_INPUT_SAMPLE   5

number of analog input signals. Normally 1 for each temperature sensor

#define ANALOG_REF_AREF   0
#define ANALOG_REF_AVCC   _BV(REFS0)
#define ANALOG_REF_INT_1_1   _BV(REFS1)
#define ANALOG_REF_INT_2_56   _BV(REFS0) | _BV(REFS1)
#define ANALYZER_CH0   63
#define ANALYZER_CH1   40
#define ANALYZER_CH2   53
#define ANALYZER_CH3   65
#define ANALYZER_CH4   59
#define ANALYZER_CH5   64
#define ANALYZER_CH6   58
#define ANALYZER_CH7   57
#define ANALYZER_OFF (   a)
#define ANALYZER_ON (   a)
#define BED_ANALOG_INPUTS   1

print ops related debug info.

Writes the free RAM to output, if it is less then at the last test. Should always return values >500 for safety, since it doesn't catch every function call. Nice to tweak cache usage or for seraching for memory induced errors. Switch it off for production, it costs execution time. If enabled, writes the created generic table to serial port at startup. If enabled, steps to move and moved steps are compared. This enables code to make M666 drop an ok, so you get problems with communication. It is to test host robustness.

#define DEBUG_MEMORY
#define E_AXIS   3
#define EXT0_ANALOG_INPUTS   1
#define EXT0_SENSOR_INDEX   0
#define EXT1_ANALOG_INPUTS   0
#define EXT2_ANALOG_INPUTS   0
#define EXT2_SENSOR_INDEX   EXT2_TEMPSENSOR_PIN
#define EXT3_ANALOG_INPUTS   0
#define EXT3_SENSOR_INDEX   EXT3_TEMPSENSOR_PIN
#define EXT4_ANALOG_INPUTS   0
#define EXT4_SENSOR_INDEX   EXT4_TEMPSENSOR_PIN
#define EXT5_ANALOG_INPUTS   0
#define EXT5_SENSOR_INDEX   EXT5_TEMPSENSOR_PIN
#define HOME_ORDER_XYZ   1
#define HOME_ORDER_XZY   2
#define HOME_ORDER_YXZ   3
#define HOME_ORDER_YZX   4
#define HOME_ORDER_ZXY   5
#define HOME_ORDER_ZYX   6
#define IGNORE_COORDINATE   99999

Uncomment, to see detailed data for every move. Only for debugging purposes! Allows M111 to set bit 5 (16) which disables all commands except M111. This can be used to test your data througput or search for communication problems.

Allows M111 so set bit 6 (32) which disables moves, at the first tried step. In combination with a dry run, you can test the speed of path computations, which are still performed.

#define int32   int32_t
#define int8   int8_t
#define KOMMA   ,

Total size of the buffer used to store the long filenames

#define MANUAL_CONTROL   true
#define MAX_VFAT_ENTRIES   (2)
#define MENU_MODE_FAN_RUNNING   8
#define MENU_MODE_SD_MOUNTED   1
#define MENU_MODE_SD_PAUSED   4
#define MENU_MODE_SD_PRINTING   2
#define MICROSTEP1   LOW,LOW
#define MICROSTEP16   HIGH,HIGH
#define MICROSTEP2   HIGH,LOW
#define MICROSTEP4   LOW,HIGH
#define MICROSTEP8   HIGH,HIGH
#define MM_PER_ARC_SEGMENT_BIG   MM_PER_ARC_SEGMENT
#define N_ARC_CORRECTION   25
#define NONLINEAR_SYSTEM   false
#define REPETIER_VERSION   "0.91"
#define SD_MAX_FOLDER_DEPTH   2
#define SPEED_MAGNIFICATION   100.0f
#define SPEED_MAX_MILLIS   50
#define SPEED_MIN_MILLIS   300
#define STR (   s)    #s
#define TEMP_PID   true
#define uint   uint16_t
#define uint32   uint32_t
#define uint8   uint8_t
#define VIRTUAL_AXIS   4
#define X_AXIS   0
#define XSTR (   s)    STR(s)
#define Y_AXIS   1
#define Z_AXIS   2

Function Documentation

void linear_move ( long  steps_remaining[])
void manage_inactivity ( uint8_t  debug)
void microstepInit ( )
void writeMonitor ( )

Writes monitored temperatures.

This function is called every 250ms to write the monitored temperature. If monitoring is disabled, the function is not called.


Variable Documentation

long baudrate

Communication speed rate.

uint8_t counter250ms
unsigned int counterPeriodical
volatile uint8_t executePeriodical
int maxadv
int maxadv2
float maxadvspeed
const uint8 osAnalogInputChannels [] PROGMEM
uint8_t pwm_pos[NUM_EXTRUDER+3]
volatile int waitRelax
 All Data Structures Namespaces Files Functions Variables Typedefs Friends Defines