Revert "Revert "Save 80B of flash and 8B of RAM and fix compiler warning:""
This reverts commit 77426b563a
.
This commit is contained in:
parent
ce7c4aa737
commit
88cce94cf9
@ -21,7 +21,7 @@ FORCE_INLINE void Config_RetrieveSettings() { Config_ResetDefault(); Config_Prin
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
inline uint8_t calibration_status() { return eeprom_read_byte((uint8_t*)EEPROM_CALIBRATION_STATUS); }
|
inline uint8_t calibration_status() { return eeprom_read_byte((uint8_t*)EEPROM_CALIBRATION_STATUS); }
|
||||||
inline uint8_t calibration_status_store(uint8_t status) { eeprom_update_byte((uint8_t*)EEPROM_CALIBRATION_STATUS, status); }
|
inline void calibration_status_store(uint8_t status) { eeprom_update_byte((uint8_t*)EEPROM_CALIBRATION_STATUS, status); }
|
||||||
inline bool calibration_status_pinda() { return eeprom_read_byte((uint8_t*)EEPROM_CALIBRATION_STATUS_PINDA); }
|
inline bool calibration_status_pinda() { return eeprom_read_byte((uint8_t*)EEPROM_CALIBRATION_STATUS_PINDA); }
|
||||||
|
|
||||||
#endif//CONFIG_STORE_H
|
#endif//CONFIG_STORE_H
|
||||||
|
@ -418,7 +418,6 @@ extern void fsensor_init();
|
|||||||
//estimated time to end of the print
|
//estimated time to end of the print
|
||||||
extern uint16_t print_time_remaining();
|
extern uint16_t print_time_remaining();
|
||||||
extern uint8_t print_percent_done();
|
extern uint8_t print_percent_done();
|
||||||
static void print_time_remaining_init();
|
|
||||||
|
|
||||||
#ifdef HOST_KEEPALIVE_FEATURE
|
#ifdef HOST_KEEPALIVE_FEATURE
|
||||||
|
|
||||||
|
@ -533,8 +533,9 @@ static bool saved_extruder_relative_mode = false;
|
|||||||
//=============================Routines======================================
|
//=============================Routines======================================
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
void get_arc_coordinates();
|
static void get_arc_coordinates();
|
||||||
bool setTargetedHotend(int code);
|
static bool setTargetedHotend(int code);
|
||||||
|
static void print_time_remaining_init();
|
||||||
|
|
||||||
void serial_echopair_P(const char *s_P, float v)
|
void serial_echopair_P(const char *s_P, float v)
|
||||||
{ serialprintPGM(s_P); SERIAL_ECHO(v); }
|
{ serialprintPGM(s_P); SERIAL_ECHO(v); }
|
||||||
@ -1910,7 +1911,6 @@ void host_keepalive() {
|
|||||||
void loop()
|
void loop()
|
||||||
{
|
{
|
||||||
KEEPALIVE_STATE(NOT_BUSY);
|
KEEPALIVE_STATE(NOT_BUSY);
|
||||||
bool stack_integrity = true;
|
|
||||||
|
|
||||||
if ((usb_printing_counter > 0) && ((millis()-_usb_timer) > 1000))
|
if ((usb_printing_counter > 0) && ((millis()-_usb_timer) > 1000))
|
||||||
{
|
{
|
||||||
@ -4308,10 +4308,11 @@ void process_commands()
|
|||||||
// The move to the first calibration point.
|
// The move to the first calibration point.
|
||||||
current_position[X_AXIS] = pgm_read_float(bed_ref_points);
|
current_position[X_AXIS] = pgm_read_float(bed_ref_points);
|
||||||
current_position[Y_AXIS] = pgm_read_float(bed_ref_points + 1);
|
current_position[Y_AXIS] = pgm_read_float(bed_ref_points + 1);
|
||||||
bool clamped = world2machine_clamp(current_position[X_AXIS], current_position[Y_AXIS]);
|
|
||||||
|
|
||||||
#ifdef SUPPORT_VERBOSITY
|
#ifdef SUPPORT_VERBOSITY
|
||||||
if (verbosity_level >= 1) {
|
if (verbosity_level >= 1)
|
||||||
|
{
|
||||||
|
bool clamped = world2machine_clamp(current_position[X_AXIS], current_position[Y_AXIS]);
|
||||||
clamped ? SERIAL_PROTOCOLPGM("First calibration point clamped.\n") : SERIAL_PROTOCOLPGM("No clamping for first calibration point.\n");
|
clamped ? SERIAL_PROTOCOLPGM("First calibration point clamped.\n") : SERIAL_PROTOCOLPGM("No clamping for first calibration point.\n");
|
||||||
}
|
}
|
||||||
#endif //SUPPORT_VERBOSITY
|
#endif //SUPPORT_VERBOSITY
|
||||||
@ -8989,7 +8990,7 @@ void print_world_coordinates()
|
|||||||
|
|
||||||
void print_physical_coordinates()
|
void print_physical_coordinates()
|
||||||
{
|
{
|
||||||
printf_P(_N("physical coordinates: (%.3f, %.3f, %.3f)\n"), st_get_position_mm[X_AXIS], st_get_position_mm[Y_AXIS], st_get_position_mm[Z_AXIS]);
|
printf_P(_N("physical coordinates: (%.3f, %.3f, %.3f)\n"), st_get_position_mm(X_AXIS), st_get_position_mm(Y_AXIS), st_get_position_mm(Z_AXIS));
|
||||||
}
|
}
|
||||||
|
|
||||||
void print_mesh_bed_leveling_table()
|
void print_mesh_bed_leveling_table()
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
//adc.c
|
//adc.c
|
||||||
|
|
||||||
#include "adc.h"
|
#include "adc.h"
|
||||||
|
#include <stdio.h>
|
||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
|
#include <avr/pgmspace.h>
|
||||||
|
|
||||||
uint8_t adc_state;
|
uint8_t adc_state;
|
||||||
uint8_t adc_count;
|
uint8_t adc_count;
|
||||||
@ -17,7 +18,7 @@ uint16_t adc_sim_mask;
|
|||||||
|
|
||||||
void adc_init(void)
|
void adc_init(void)
|
||||||
{
|
{
|
||||||
printf(("adc_init\n"));
|
printf_P(PSTR("adc_init\n"));
|
||||||
adc_sim_mask = 0x00;
|
adc_sim_mask = 0x00;
|
||||||
ADCSRA |= (1 << ADPS2) | (1 << ADPS1) | (1 << ADPS0);
|
ADCSRA |= (1 << ADPS2) | (1 << ADPS1) | (1 << ADPS0);
|
||||||
ADMUX |= (1 << REFS0);
|
ADMUX |= (1 << REFS0);
|
||||||
|
@ -63,7 +63,7 @@ uint8_t lang_select(uint8_t lang)
|
|||||||
if (lang_check(_SEC_LANG_TABLE))
|
if (lang_check(_SEC_LANG_TABLE))
|
||||||
if (pgm_read_dword(((uint32_t*)(_SEC_LANG_TABLE + 12))) == pgm_read_dword(((uint32_t*)(_PRI_LANG_SIGNATURE)))) //signature valid
|
if (pgm_read_dword(((uint32_t*)(_SEC_LANG_TABLE + 12))) == pgm_read_dword(((uint32_t*)(_PRI_LANG_SIGNATURE)))) //signature valid
|
||||||
{
|
{
|
||||||
lang_table = _SEC_LANG_TABLE; // set table pointer
|
lang_table = (lang_table_t*)(_SEC_LANG_TABLE); // set table pointer
|
||||||
lang_selected = lang; // set language id
|
lang_selected = lang; // set language id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -138,7 +138,7 @@ uint8_t lang_get_header(uint8_t lang, lang_table_header_t* header, uint32_t* off
|
|||||||
if (lang == LANG_ID_SEC)
|
if (lang == LANG_ID_SEC)
|
||||||
{
|
{
|
||||||
uint16_t ui = _SEC_LANG_TABLE; //table pointer
|
uint16_t ui = _SEC_LANG_TABLE; //table pointer
|
||||||
memcpy_P(header, ui, sizeof(lang_table_header_t)); //read table header from progmem
|
memcpy_P(header, (lang_table_t*)(_SEC_LANG_TABLE), sizeof(lang_table_header_t)); //read table header from progmem
|
||||||
if (offset) *offset = ui;
|
if (offset) *offset = ui;
|
||||||
return (header->magic == LANG_MAGIC)?1:0; //return 1 if magic valid
|
return (header->magic == LANG_MAGIC)?1:0; //return 1 if magic valid
|
||||||
}
|
}
|
||||||
@ -147,7 +147,7 @@ uint8_t lang_get_header(uint8_t lang, lang_table_header_t* header, uint32_t* off
|
|||||||
lang--;
|
lang--;
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
w25x20cl_rd_data(addr, header, sizeof(lang_table_header_t)); //read table header from xflash
|
w25x20cl_rd_data(addr, (uint8_t*)(header), sizeof(lang_table_header_t)); //read table header from xflash
|
||||||
if (header->magic != LANG_MAGIC) break; //break if not valid
|
if (header->magic != LANG_MAGIC) break; //break if not valid
|
||||||
if (offset) *offset = addr;
|
if (offset) *offset = addr;
|
||||||
if (--lang == 0) return 1;
|
if (--lang == 0) return 1;
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
/** @file */
|
||||||
//language.h
|
//language.h
|
||||||
#ifndef LANGUAGE_H
|
#ifndef LANGUAGE_H
|
||||||
#define LANGUAGE_H
|
#define LANGUAGE_H
|
||||||
@ -22,11 +23,14 @@
|
|||||||
#define STRINGIFY_(n) #n
|
#define STRINGIFY_(n) #n
|
||||||
#define STRINGIFY(n) STRINGIFY_(n)
|
#define STRINGIFY(n) STRINGIFY_(n)
|
||||||
|
|
||||||
//section progmem0 will be used for localized translated strings
|
/** @def PROGMEM_I2
|
||||||
|
* @brief section progmem0 will be used for localized translated strings */
|
||||||
#define PROGMEM_I2 __attribute__((section(".progmem0")))
|
#define PROGMEM_I2 __attribute__((section(".progmem0")))
|
||||||
//section progmem1 will be used for localized strings in english
|
/** @def PROGMEM_I1
|
||||||
|
* @brief section progmem1 will be used for localized strings in english */
|
||||||
#define PROGMEM_I1 __attribute__((section(".progmem1")))
|
#define PROGMEM_I1 __attribute__((section(".progmem1")))
|
||||||
//section progmem2 will be used for not localized strings in english
|
/** @def PROGMEM_N1
|
||||||
|
* @brief section progmem2 will be used for not localized strings in english */
|
||||||
#define PROGMEM_N1 __attribute__((section(".progmem2")))
|
#define PROGMEM_N1 __attribute__((section(".progmem2")))
|
||||||
|
|
||||||
#if (LANG_MODE == 0) //primary language only
|
#if (LANG_MODE == 0) //primary language only
|
||||||
@ -43,7 +47,7 @@
|
|||||||
#define _N(s) (__extension__({static const char __c[] PROGMEM_N1 = s; &__c[0];}))
|
#define _N(s) (__extension__({static const char __c[] PROGMEM_N1 = s; &__c[0];}))
|
||||||
#define _n(s) _N(s)
|
#define _n(s) _N(s)
|
||||||
|
|
||||||
//lang_table_header_t structure - (size= 16byte)
|
/** @brief lang_table_header_t structure - (size= 16byte) */
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
uint32_t magic; //+0
|
uint32_t magic; //+0
|
||||||
@ -54,67 +58,76 @@ typedef struct
|
|||||||
uint32_t signature; //+12
|
uint32_t signature; //+12
|
||||||
} lang_table_header_t;
|
} lang_table_header_t;
|
||||||
|
|
||||||
//lang_table_t structure - (size= 16byte + 2*count)
|
/** @brief lang_table_t structure - (size= 16byte + 2*count) */
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
lang_table_header_t header;
|
lang_table_header_t header;
|
||||||
uint16_t table[];
|
uint16_t table[];
|
||||||
} lang_table_t;
|
} lang_table_t;
|
||||||
|
|
||||||
// Language indices into their particular symbol tables.
|
/** @name Language indices into their particular symbol tables.*/
|
||||||
|
///@{
|
||||||
#define LANG_ID_PRI 0
|
#define LANG_ID_PRI 0
|
||||||
#define LANG_ID_SEC 1
|
#define LANG_ID_SEC 1
|
||||||
|
///@}
|
||||||
|
|
||||||
// Language is not defined and it shall be selected from the menu.
|
/** @def LANG_ID_FORCE_SELECTION
|
||||||
|
* @brief Language is not defined and it shall be selected from the menu.*/
|
||||||
#define LANG_ID_FORCE_SELECTION 254
|
#define LANG_ID_FORCE_SELECTION 254
|
||||||
|
|
||||||
// Language is not defined on a virgin RAMBo board.
|
/** @def LANG_ID_UNDEFINED
|
||||||
|
* @brief Language is not defined on a virgin RAMBo board. */
|
||||||
#define LANG_ID_UNDEFINED 255
|
#define LANG_ID_UNDEFINED 255
|
||||||
|
|
||||||
// Default language ID, if no language is selected.
|
/** @def LANG_ID_DEFAULT
|
||||||
|
* @brief Default language ID, if no language is selected. */
|
||||||
#define LANG_ID_DEFAULT LANG_ID_PRI
|
#define LANG_ID_DEFAULT LANG_ID_PRI
|
||||||
|
|
||||||
// Magic number at begin of lang table.
|
/** @def LANG_MAGIC
|
||||||
|
* @brief Magic number at begin of lang table. */
|
||||||
#define LANG_MAGIC 0x4bb45aa5
|
#define LANG_MAGIC 0x4bb45aa5
|
||||||
|
|
||||||
// Language codes (ISO639-1)
|
/** @name Language codes (ISO639-1)*/
|
||||||
#define LANG_CODE_XX 0x3f3f //'??'
|
///@{
|
||||||
#define LANG_CODE_EN 0x656e //'en'
|
#define LANG_CODE_XX 0x3f3f //!<'??'
|
||||||
#define LANG_CODE_CZ 0x6373 //'cs'
|
#define LANG_CODE_EN 0x656e //!<'en'
|
||||||
#define LANG_CODE_DE 0x6465 //'de'
|
#define LANG_CODE_CZ 0x6373 //!<'cs'
|
||||||
#define LANG_CODE_ES 0x6573 //'es'
|
#define LANG_CODE_DE 0x6465 //!<'de'
|
||||||
#define LANG_CODE_IT 0x6974 //'it'
|
#define LANG_CODE_ES 0x6573 //!<'es'
|
||||||
#define LANG_CODE_PL 0x706c //'pl'
|
#define LANG_CODE_IT 0x6974 //!<'it'
|
||||||
|
#define LANG_CODE_PL 0x706c //!<'pl'
|
||||||
|
///@}
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif //defined(__cplusplus)
|
#endif //defined(__cplusplus)
|
||||||
|
|
||||||
// Currectly active language selection.
|
/** @brief Currectly active language selection.*/
|
||||||
extern uint8_t lang_selected;
|
extern uint8_t lang_selected;
|
||||||
|
|
||||||
#if (LANG_MODE != 0)
|
#if (LANG_MODE != 0)
|
||||||
extern const char _SEC_LANG[LANG_SIZE_RESERVED];
|
extern const char _SEC_LANG[LANG_SIZE_RESERVED];
|
||||||
extern const char* lang_get_translation(const char* s);
|
extern const char* lang_get_translation(const char* s);
|
||||||
|
/** @def _SEC_LANG_TABLE
|
||||||
|
* @brief Align table to start of 256 byte page */
|
||||||
#define _SEC_LANG_TABLE ((((uint16_t)&_SEC_LANG) + 0x00ff) & 0xff00)
|
#define _SEC_LANG_TABLE ((((uint16_t)&_SEC_LANG) + 0x00ff) & 0xff00)
|
||||||
//extern const uint32_t _PRI_LANG_SIGNATURE;
|
|
||||||
#endif //(LANG_MODE != 0)
|
#endif //(LANG_MODE != 0)
|
||||||
|
|
||||||
//selects language, eeprom is updated in case of success
|
/** @brief selects language, eeprom is updated in case of success */
|
||||||
extern uint8_t lang_select(uint8_t lang);
|
extern uint8_t lang_select(uint8_t lang);
|
||||||
//performs checksum test of secondary language data
|
/** @brief performs checksum test of secondary language data */
|
||||||
extern uint8_t lang_check(uint16_t addr);
|
extern uint8_t lang_check(uint16_t addr);
|
||||||
//returns total number of languages (primary + all in xflash)
|
/** @return total number of languages (primary + all in xflash) */
|
||||||
extern uint8_t lang_get_count(void);
|
extern uint8_t lang_get_count(void);
|
||||||
//reads lang table header and offset in xflash or progmem
|
/** @brief reads lang table header and offset in xflash or progmem */
|
||||||
extern uint8_t lang_get_header(uint8_t lang, lang_table_header_t* header, uint32_t* offset);
|
extern uint8_t lang_get_header(uint8_t lang, lang_table_header_t* header, uint32_t* offset);
|
||||||
//reads lang code from xflash or progmem
|
/** @brief reads lang code from xflash or progmem */
|
||||||
extern uint16_t lang_get_code(uint8_t lang);
|
extern uint16_t lang_get_code(uint8_t lang);
|
||||||
//returns localized language name (text for menu item)
|
/** @return localized language name (text for menu item) */
|
||||||
extern const char* lang_get_name_by_code(uint16_t code);
|
extern const char* lang_get_name_by_code(uint16_t code);
|
||||||
//reset language to "LANG_ID_FORCE_SELECTION", epprom is updated
|
/** @brief reset language to "LANG_ID_FORCE_SELECTION", epprom is updated */
|
||||||
extern void lang_reset(void);
|
extern void lang_reset(void);
|
||||||
//returns 1 if language is selected
|
/** @retval 1 language is selected */
|
||||||
extern uint8_t lang_is_selected(void);
|
extern uint8_t lang_is_selected(void);
|
||||||
|
|
||||||
#ifdef DEBUG_SEC_LANG
|
#ifdef DEBUG_SEC_LANG
|
||||||
|
@ -3,9 +3,10 @@
|
|||||||
#include "sm4.h"
|
#include "sm4.h"
|
||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
#include <avr/pgmspace.h>
|
#include <avr/pgmspace.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include "Arduino.h"
|
||||||
|
|
||||||
#include "boards.h"
|
#include "boards.h"
|
||||||
#define bool int8_t
|
|
||||||
#define false 0
|
#define false 0
|
||||||
#define true 1
|
#define true 1
|
||||||
#include "Configuration_prusa.h"
|
#include "Configuration_prusa.h"
|
||||||
@ -191,4 +192,4 @@ uint16_t sm4_line_xyze_ui(uint16_t dx, uint16_t dy, uint16_t dz, uint16_t de)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif //NEW_XYZCAL
|
#endif //NEW_XYZCAL
|
||||||
|
@ -205,6 +205,16 @@ unsigned long watchmillis[EXTRUDERS] = ARRAY_BY_EXTRUDERS(0,0,0);
|
|||||||
//============================= functions ============================
|
//============================= functions ============================
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
|
#if (defined (TEMP_RUNAWAY_BED_HYSTERESIS) && TEMP_RUNAWAY_BED_TIMEOUT > 0) || (defined (TEMP_RUNAWAY_EXTRUDER_HYSTERESIS) && TEMP_RUNAWAY_EXTRUDER_TIMEOUT > 0)
|
||||||
|
static float temp_runaway_status[4];
|
||||||
|
static float temp_runaway_target[4];
|
||||||
|
static float temp_runaway_timer[4];
|
||||||
|
static int temp_runaway_error_counter[4];
|
||||||
|
|
||||||
|
static void temp_runaway_check(int _heater_id, float _target_temperature, float _current_temperature, float _output, bool _isbed);
|
||||||
|
static void temp_runaway_stop(bool isPreheat, bool isBed);
|
||||||
|
#endif
|
||||||
|
|
||||||
void PID_autotune(float temp, int extruder, int ncycles)
|
void PID_autotune(float temp, int extruder, int ncycles)
|
||||||
{
|
{
|
||||||
pid_number_of_cycles = ncycles;
|
pid_number_of_cycles = ncycles;
|
||||||
@ -1473,7 +1483,7 @@ void bed_min_temp_error(void) {
|
|||||||
}
|
}
|
||||||
#ifndef BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
|
#ifndef BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
|
||||||
Stop();
|
Stop();
|
||||||
#endif*/
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HEATER_0_USES_MAX6675
|
#ifdef HEATER_0_USES_MAX6675
|
||||||
|
@ -189,16 +189,6 @@ FORCE_INLINE bool isCoolingBed() {
|
|||||||
#error Invalid number of extruders
|
#error Invalid number of extruders
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined (TEMP_RUNAWAY_BED_HYSTERESIS) && TEMP_RUNAWAY_BED_TIMEOUT > 0) || (defined (TEMP_RUNAWAY_EXTRUDER_HYSTERESIS) && TEMP_RUNAWAY_EXTRUDER_TIMEOUT > 0)
|
|
||||||
static float temp_runaway_status[4];
|
|
||||||
static float temp_runaway_target[4];
|
|
||||||
static float temp_runaway_timer[4];
|
|
||||||
static int temp_runaway_error_counter[4];
|
|
||||||
|
|
||||||
void temp_runaway_check(int _heater_id, float _target_temperature, float _current_temperature, float _output, bool _isbed);
|
|
||||||
void temp_runaway_stop(bool isPreheat, bool isBed);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int getHeaterPower(int heater);
|
int getHeaterPower(int heater);
|
||||||
void disable_heater();
|
void disable_heater();
|
||||||
void setWatch();
|
void setWatch();
|
||||||
|
@ -876,7 +876,7 @@ void tmc2130_set_wave(uint8_t axis, uint8_t amp, uint8_t fac1000)
|
|||||||
uint8_t x[3] = {255,255,255}; //X segment bounds (MSLUTSEL)
|
uint8_t x[3] = {255,255,255}; //X segment bounds (MSLUTSEL)
|
||||||
uint8_t s = 0; //current segment
|
uint8_t s = 0; //current segment
|
||||||
int8_t b; //encoded bit value
|
int8_t b; //encoded bit value
|
||||||
uint8_t dA; //delta value
|
int8_t dA; //delta value
|
||||||
int i; //microstep index
|
int i; //microstep index
|
||||||
uint32_t reg; //tmc2130 register
|
uint32_t reg; //tmc2130 register
|
||||||
tmc2130_wr_MSLUTSTART(axis, 0, amp);
|
tmc2130_wr_MSLUTSTART(axis, 0, amp);
|
||||||
|
@ -41,7 +41,7 @@ void uart2_init(void)
|
|||||||
fdev_setup_stream(uart2io, uart2_putchar, uart2_getchar, _FDEV_SETUP_WRITE | _FDEV_SETUP_READ); //setup uart2 i/o stream
|
fdev_setup_stream(uart2io, uart2_putchar, uart2_getchar, _FDEV_SETUP_WRITE | _FDEV_SETUP_READ); //setup uart2 i/o stream
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t uart2_rx_clr(void)
|
void uart2_rx_clr(void)
|
||||||
{
|
{
|
||||||
rbuf_w(uart2_ibuf) = 0;
|
rbuf_w(uart2_ibuf) = 0;
|
||||||
rbuf_r(uart2_ibuf) = 0;
|
rbuf_r(uart2_ibuf) = 0;
|
||||||
|
@ -18,7 +18,7 @@ extern FILE _uart2io;
|
|||||||
|
|
||||||
extern void uart2_init(void);
|
extern void uart2_init(void);
|
||||||
|
|
||||||
extern uint8_t uart2_rx_clr(void);
|
extern void uart2_rx_clr(void);
|
||||||
|
|
||||||
extern uint8_t uart2_rx_ok(void);
|
extern uint8_t uart2_rx_ok(void);
|
||||||
|
|
||||||
@ -26,4 +26,4 @@ extern uint8_t uart2_rx_ok(void);
|
|||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
}
|
}
|
||||||
#endif //defined(__cplusplus)
|
#endif //defined(__cplusplus)
|
||||||
#endif //_UART2_H
|
#endif //_UART2_H
|
||||||
|
@ -199,6 +199,8 @@ static const char* lcd_display_message_fullscreen_nonBlocking_P(const char *msg,
|
|||||||
|
|
||||||
/* Different menus */
|
/* Different menus */
|
||||||
static void lcd_status_screen();
|
static void lcd_status_screen();
|
||||||
|
static void lcd_language_menu();
|
||||||
|
|
||||||
extern bool powersupply;
|
extern bool powersupply;
|
||||||
static void lcd_main_menu();
|
static void lcd_main_menu();
|
||||||
static void lcd_tune_menu();
|
static void lcd_tune_menu();
|
||||||
@ -226,6 +228,49 @@ static void lcd_menu_xyz_offset();
|
|||||||
static void lcd_menu_fails_stats();
|
static void lcd_menu_fails_stats();
|
||||||
#endif //TMC2130 or PAT9125
|
#endif //TMC2130 or PAT9125
|
||||||
|
|
||||||
|
static void lcd_selftest_v();
|
||||||
|
static bool lcd_selfcheck_endstops();
|
||||||
|
|
||||||
|
#ifdef TMC2130
|
||||||
|
static void reset_crash_det(char axis);
|
||||||
|
static bool lcd_selfcheck_axis_sg(char axis);
|
||||||
|
static bool lcd_selfcheck_axis(int _axis, int _travel);
|
||||||
|
#else
|
||||||
|
static bool lcd_selfcheck_endstops();
|
||||||
|
static bool lcd_selfcheck_axis(int _axis, int _travel);
|
||||||
|
static bool lcd_selfcheck_pulleys(int axis);
|
||||||
|
#endif //TMC2130
|
||||||
|
|
||||||
|
static bool lcd_selfcheck_check_heater(bool _isbed);
|
||||||
|
static int lcd_selftest_screen(int _step, int _progress, int _progress_scale, bool _clear, int _delay);
|
||||||
|
static void lcd_selftest_screen_step(int _row, int _col, int _state, const char *_name, const char *_indicator);
|
||||||
|
static bool lcd_selftest_manual_fan_check(int _fan, bool check_opposite);
|
||||||
|
static bool lcd_selftest_fan_dialog(int _fan);
|
||||||
|
static bool lcd_selftest_fsensor();
|
||||||
|
static void lcd_selftest_error(int _error_no, const char *_error_1, const char *_error_2);
|
||||||
|
static void lcd_colorprint_change();
|
||||||
|
static int get_ext_nr();
|
||||||
|
static void extr_adj_0();
|
||||||
|
static void extr_adj_1();
|
||||||
|
static void extr_adj_2();
|
||||||
|
static void extr_adj_3();
|
||||||
|
static void fil_load_menu();
|
||||||
|
static void fil_unload_menu();
|
||||||
|
static void extr_unload_0();
|
||||||
|
static void extr_unload_1();
|
||||||
|
static void extr_unload_2();
|
||||||
|
static void extr_unload_3();
|
||||||
|
static void lcd_disable_farm_mode();
|
||||||
|
static void lcd_set_fan_check();
|
||||||
|
static char snmm_stop_print_menu();
|
||||||
|
#ifdef SDCARD_SORT_ALPHA
|
||||||
|
static void lcd_sort_type_set();
|
||||||
|
#endif
|
||||||
|
static float count_e(float layer_heigth, float extrusion_width, float extrusion_length);
|
||||||
|
static void lcd_babystep_z();
|
||||||
|
static void lcd_send_status();
|
||||||
|
static void lcd_connect_printer();
|
||||||
|
|
||||||
void lcd_finishstatus();
|
void lcd_finishstatus();
|
||||||
|
|
||||||
static void lcd_control_retract_menu();
|
static void lcd_control_retract_menu();
|
||||||
@ -2737,8 +2782,8 @@ static void lcd_menu_xyz_skew()
|
|||||||
//|01234567890123456789|
|
//|01234567890123456789|
|
||||||
//|Measured skew: N/A |
|
//|Measured skew: N/A |
|
||||||
//|--------------------|
|
//|--------------------|
|
||||||
//|Slight skew: 0.12°|
|
//|Slight skew: 0.12d|
|
||||||
//|Severe skew: 0.25°|
|
//|Severe skew: 0.25d|
|
||||||
//----------------------
|
//----------------------
|
||||||
float angleDiff = eeprom_read_float((float*)(EEPROM_XYZ_CAL_SKEW));
|
float angleDiff = eeprom_read_float((float*)(EEPROM_XYZ_CAL_SKEW));
|
||||||
lcd_printf_P(_N(
|
lcd_printf_P(_N(
|
||||||
|
@ -12,7 +12,6 @@ extern void menu_lcd_longpress_func(void);
|
|||||||
extern void menu_lcd_charsetup_func(void);
|
extern void menu_lcd_charsetup_func(void);
|
||||||
extern void menu_lcd_lcdupdate_func(void);
|
extern void menu_lcd_lcdupdate_func(void);
|
||||||
|
|
||||||
static void lcd_language_menu();
|
|
||||||
|
|
||||||
// Call with a false parameter to suppress the LCD update from various places like the planner or the temp control.
|
// Call with a false parameter to suppress the LCD update from various places like the planner or the temp control.
|
||||||
void ultralcd_init();
|
void ultralcd_init();
|
||||||
@ -39,27 +38,8 @@ extern void menu_lcd_lcdupdate_func(void);
|
|||||||
unsigned char lcd_choose_color();
|
unsigned char lcd_choose_color();
|
||||||
//void lcd_mylang();
|
//void lcd_mylang();
|
||||||
|
|
||||||
static void lcd_selftest_v();
|
|
||||||
extern bool lcd_selftest();
|
extern bool lcd_selftest();
|
||||||
static bool lcd_selfcheck_endstops();
|
|
||||||
|
|
||||||
#ifdef TMC2130
|
|
||||||
static void reset_crash_det(char axis);
|
|
||||||
static bool lcd_selfcheck_axis_sg(char axis);
|
|
||||||
static bool lcd_selfcheck_axis(int _axis, int _travel);
|
|
||||||
#else
|
|
||||||
static bool lcd_selfcheck_endstops();
|
|
||||||
static bool lcd_selfcheck_axis(int _axis, int _travel);
|
|
||||||
static bool lcd_selfcheck_pulleys(int axis);
|
|
||||||
#endif //TMC2130
|
|
||||||
|
|
||||||
static bool lcd_selfcheck_check_heater(bool _isbed);
|
|
||||||
static int lcd_selftest_screen(int _step, int _progress, int _progress_scale, bool _clear, int _delay);
|
|
||||||
static void lcd_selftest_screen_step(int _row, int _col, int _state, const char *_name, const char *_indicator);
|
|
||||||
static bool lcd_selftest_manual_fan_check(int _fan, bool check_opposite);
|
|
||||||
static bool lcd_selftest_fan_dialog(int _fan);
|
|
||||||
static bool lcd_selftest_fsensor();
|
|
||||||
static void lcd_selftest_error(int _error_no, const char *_error_1, const char *_error_2);
|
|
||||||
void lcd_menu_statistics();
|
void lcd_menu_statistics();
|
||||||
|
|
||||||
extern const char* lcd_display_message_fullscreen_P(const char *msg, uint8_t &nlines);
|
extern const char* lcd_display_message_fullscreen_P(const char *msg, uint8_t &nlines);
|
||||||
@ -83,7 +63,6 @@ extern void menu_lcd_lcdupdate_func(void);
|
|||||||
extern void lcd_diag_show_end_stops();
|
extern void lcd_diag_show_end_stops();
|
||||||
|
|
||||||
|
|
||||||
static unsigned char blink = 0; // Variable for visualization of fan rotation in GLCD
|
|
||||||
|
|
||||||
#define LCD_MESSAGEPGM(x) lcd_setstatuspgm(PSTR(x))
|
#define LCD_MESSAGEPGM(x) lcd_setstatuspgm(PSTR(x))
|
||||||
#define LCD_ALERTMESSAGEPGM(x) lcd_setalertstatuspgm(PSTR(x))
|
#define LCD_ALERTMESSAGEPGM(x) lcd_setalertstatuspgm(PSTR(x))
|
||||||
@ -136,30 +115,11 @@ extern void menu_lcd_lcdupdate_func(void);
|
|||||||
|
|
||||||
|
|
||||||
void change_extr(int extr);
|
void change_extr(int extr);
|
||||||
static void lcd_colorprint_change();
|
|
||||||
static int get_ext_nr();
|
|
||||||
void extr_adj(int extruder);
|
void extr_adj(int extruder);
|
||||||
static void extr_adj_0();
|
|
||||||
static void extr_adj_1();
|
|
||||||
static void extr_adj_2();
|
|
||||||
static void extr_adj_3();
|
|
||||||
static void fil_load_menu();
|
|
||||||
static void fil_unload_menu();
|
|
||||||
static void extr_unload_0();
|
|
||||||
static void extr_unload_1();
|
|
||||||
static void extr_unload_2();
|
|
||||||
static void extr_unload_3();
|
|
||||||
static void lcd_disable_farm_mode();
|
|
||||||
static void lcd_set_fan_check();
|
|
||||||
void extr_unload_all();
|
void extr_unload_all();
|
||||||
void extr_unload_used();
|
void extr_unload_used();
|
||||||
void extr_unload();
|
void extr_unload();
|
||||||
static char snmm_stop_print_menu();
|
|
||||||
#ifdef SDCARD_SORT_ALPHA
|
|
||||||
static void lcd_sort_type_set();
|
|
||||||
#endif
|
|
||||||
static float count_e(float layer_heigth, float extrusion_width, float extrusion_length);
|
|
||||||
static void lcd_babystep_z();
|
|
||||||
|
|
||||||
void stack_error();
|
void stack_error();
|
||||||
void lcd_printer_connected();
|
void lcd_printer_connected();
|
||||||
@ -204,7 +164,4 @@ void lcd_language();
|
|||||||
void lcd_wizard();
|
void lcd_wizard();
|
||||||
void lcd_wizard(int state);
|
void lcd_wizard(int state);
|
||||||
|
|
||||||
static void lcd_send_status();
|
|
||||||
static void lcd_connect_printer();
|
|
||||||
|
|
||||||
#endif //ULTRALCD_H
|
#endif //ULTRALCD_H
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
// unification for AVR and RPI
|
// unification for AVR and RPI
|
||||||
#define __AVR
|
|
||||||
|
|
||||||
#ifdef __AVR
|
#ifdef __AVR
|
||||||
//#include "Arduino.h"
|
//#include "Arduino.h"
|
||||||
@ -29,3 +28,4 @@
|
|||||||
void print(int v) { printf("%d", v); }
|
void print(int v) { printf("%d", v); }
|
||||||
void print(float v) { printf("%f", v); }
|
void print(float v) { printf("%f", v); }
|
||||||
#endif //RC522_RPI
|
#endif //RC522_RPI
|
||||||
|
|
||||||
|
@ -99,11 +99,11 @@
|
|||||||
#define MANUAL_FEEDRATE {2700, 2700, 1000, 100} // set the speeds for manual moves (mm/min)
|
#define MANUAL_FEEDRATE {2700, 2700, 1000, 100} // set the speeds for manual moves (mm/min)
|
||||||
|
|
||||||
//Silent mode limits
|
//Silent mode limits
|
||||||
#define SILENT_MAX_ACCEL_XY 960 // max acceleration in silent mode in mm/s^2
|
#define SILENT_MAX_ACCEL_XY 960ul // max acceleration in silent mode in mm/s^2
|
||||||
#define SILENT_MAX_FEEDRATE_XY 172 // max feedrate in mm/s
|
#define SILENT_MAX_FEEDRATE_XY 172 // max feedrate in mm/s
|
||||||
|
|
||||||
//Normal mode limits
|
//Normal mode limits
|
||||||
#define NORMAL_MAX_ACCEL_XY 2500 // max acceleration in normal mode in mm/s^2
|
#define NORMAL_MAX_ACCEL_XY 2500ul // max acceleration in normal mode in mm/s^2
|
||||||
#define NORMAL_MAX_FEEDRATE_XY 200 // max feedrate in mm/s
|
#define NORMAL_MAX_FEEDRATE_XY 200 // max feedrate in mm/s
|
||||||
|
|
||||||
//number of bytes from end of the file to start check
|
//number of bytes from end of the file to start check
|
||||||
|
@ -100,12 +100,12 @@
|
|||||||
#define MANUAL_FEEDRATE {2700, 2700, 1000, 100} // set the speeds for manual moves (mm/min)
|
#define MANUAL_FEEDRATE {2700, 2700, 1000, 100} // set the speeds for manual moves (mm/min)
|
||||||
|
|
||||||
//Silent mode limits
|
//Silent mode limits
|
||||||
#define SILENT_MAX_ACCEL 960 // max axxeleration in silent mode in mm/s^2
|
#define SILENT_MAX_ACCEL 960ul // max axxeleration in silent mode in mm/s^2
|
||||||
#define SILENT_MAX_ACCEL_ST (100*SILENT_MAX_ACCEL) // max accel in steps/s^2
|
#define SILENT_MAX_ACCEL_ST (100*SILENT_MAX_ACCEL) // max accel in steps/s^2
|
||||||
#define SILENT_MAX_FEEDRATE 172 //max feedrate in mm/s, because mode switched to normal for homming , this value limits also homing, it should be greater (172mm/s=9600mm/min>2700mm/min)
|
#define SILENT_MAX_FEEDRATE 172 //max feedrate in mm/s, because mode switched to normal for homming , this value limits also homing, it should be greater (172mm/s=9600mm/min>2700mm/min)
|
||||||
|
|
||||||
//Normal mode limits
|
//Normal mode limits
|
||||||
#define NORMAL_MAX_ACCEL 2500 // Y-axis max axxeleration in normal mode in mm/s^2
|
#define NORMAL_MAX_ACCEL 2500ul // Y-axis max axxeleration in normal mode in mm/s^2
|
||||||
#define NORMAL_MAX_ACCEL_ST (100*NORMAL_MAX_ACCEL) // max accel in steps/s^2
|
#define NORMAL_MAX_ACCEL_ST (100*NORMAL_MAX_ACCEL) // max accel in steps/s^2
|
||||||
#define NORMAL_MAX_FEEDRATE 200 //max feedrate in mm/s, because mode switched to normal for homming , this value limits also homing, it should be greater (172mm/s=9600mm/min>2700mm/min)
|
#define NORMAL_MAX_FEEDRATE 200 //max feedrate in mm/s, because mode switched to normal for homming , this value limits also homing, it should be greater (172mm/s=9600mm/min>2700mm/min)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user