Merge branch 'Development' into marlin_configurator
Latest upstream changes
This commit is contained in:
commit
c1240f23dd
@ -118,6 +118,7 @@ Here are some standard links for getting your machine calibrated:
|
||||
// 1010 is Pt1000 with 1k pullup (non standard)
|
||||
// 147 is Pt100 with 4k7 pullup
|
||||
// 110 is Pt100 with 1k pullup (non standard)
|
||||
// 999 is a Dummy Table. It will ALWAYS read 25C.. Use it for Testing or Development purposes. NEVER for production machine.
|
||||
|
||||
#define TEMP_SENSOR_0 -1
|
||||
#define TEMP_SENSOR_1 -1
|
||||
|
@ -284,6 +284,11 @@
|
||||
//=============================Additional Features===========================
|
||||
//===========================================================================
|
||||
|
||||
#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
|
||||
#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
|
||||
#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
|
||||
//#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value
|
||||
|
||||
//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
|
||||
#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
|
||||
|
||||
|
@ -14,10 +14,14 @@
|
||||
// it is a Russian alphabet translation
|
||||
// except 0401 --> 0xa2 = ╗, 0451 --> 0xb5
|
||||
const PROGMEM uint8_t utf_recode[] =
|
||||
{ 0x41,0xa0,0x42,0xa1,0xe0,0x45,0xa3,0xa4,0xa5,0xa6,0x4b,0xa7,0x4d,0x48,0x4f,
|
||||
0xa8,0x50,0x43,0x54,0xa9,0xaa,0x58,0xe1,0xab,0xac,0xe2,0xad,0xae,0x62,0xaf,0xb0,0xb1,
|
||||
0x61,0xb2,0xb3,0xb4,0xe3,0x65,0xb6,0xb7,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0x6f,
|
||||
0xbe,0x70,0x63,0xbf,0x79,0xe4,0x78,0xe5,0xc0,0xc1,0xe6,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7
|
||||
{ 0x41,0xa0,0x42,0xa1,0xe0,0x45,0xa3,0xa4,
|
||||
0xa5,0xa6,0x4b,0xa7,0x4d,0x48,0x4f,0xa8,
|
||||
0x50,0x43,0x54,0xa9,0xaa,0x58,0xe1,0xab,
|
||||
0xac,0xe2,0xad,0xae,0x62,0xaf,0xb0,0xb1,
|
||||
0x61,0xb2,0xb3,0xb4,0xe3,0x65,0xb6,0xb7,
|
||||
0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0x6f,0xbe,
|
||||
0x70,0x63,0xbf,0x79,0xe4,0x78,0xe5,0xc0,
|
||||
0xc1,0xe6,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7
|
||||
};
|
||||
|
||||
// When the display powers up, it is configured as follows:
|
||||
|
@ -50,10 +50,11 @@
|
||||
#define BOARD_LEAPFROG 999 // Leapfrog
|
||||
#define BOARD_WITBOX 41 // bq WITBOX
|
||||
#define BOARD_HEPHESTOS 42 // bq Prusa i3 Hephestos
|
||||
#define BOARD_BAM_DICE 401 // 2PrintBeta BAM&DICE with STK drivers
|
||||
#define BOARD_BAM_DICE_DUE 402 // 2PrintBeta BAM&DICE Due with STK drivers
|
||||
|
||||
#define BOARD_99 99 // This is in pins.h but...?
|
||||
|
||||
#define MB(board) (MOTHERBOARD==BOARD_##board)
|
||||
#define IS_RAMPS (MB(RAMPS_OLD) || MB(RAMPS_13_EFB) || MB(RAMPS_13_EEB) || MB(RAMPS_13_EFF) || MB(RAMPS_13_EEF))
|
||||
|
||||
#endif //__BOARDS_H
|
||||
|
@ -65,7 +65,7 @@ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const m
|
||||
createFilename(lfilename,p);
|
||||
|
||||
path[0]=0;
|
||||
if(strlen(prepend)==0) //avoid leading / if already in prepend
|
||||
if(prepend[0]==0) //avoid leading / if already in prepend
|
||||
{
|
||||
strcat(path,"/");
|
||||
}
|
||||
|
@ -315,7 +315,7 @@ static void lcd_implementation_drawmenu_generic(uint8_t row, const char* pstr, c
|
||||
|
||||
static void _drawmenu_setting_edit_generic(uint8_t row, const char* pstr, char pre_char, const char* data, bool pgm) {
|
||||
char c;
|
||||
uint8_t n = LCD_WIDTH - 2 - (pgm ? strlen_P(data) : (strlen(data)));
|
||||
uint8_t n = LCD_WIDTH - 2 - (pgm ? lcd_strlen_P(data) : (lcd_strlen((char*)data)));
|
||||
|
||||
lcd_implementation_mark_as_selected(row, pre_char);
|
||||
|
||||
@ -377,18 +377,18 @@ void lcd_implementation_drawedit(const char* pstr, char* value) {
|
||||
uint8_t char_width = DOG_CHAR_WIDTH;
|
||||
|
||||
#ifdef USE_BIG_EDIT_FONT
|
||||
if (strlen_P(pstr) <= LCD_WIDTH_EDIT - 1) {
|
||||
if (lcd_strlen_P(pstr) <= LCD_WIDTH_EDIT - 1) {
|
||||
u8g.setFont(FONT_MENU_EDIT);
|
||||
lcd_width = LCD_WIDTH_EDIT + 1;
|
||||
char_width = DOG_CHAR_WIDTH_EDIT;
|
||||
if (strlen_P(pstr) >= LCD_WIDTH_EDIT - strlen(value)) rows = 2;
|
||||
if (lcd_strlen_P(pstr) >= LCD_WIDTH_EDIT - lcd_strlen(value)) rows = 2;
|
||||
}
|
||||
else {
|
||||
u8g.setFont(FONT_MENU);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (strlen_P(pstr) > LCD_WIDTH - 2 - strlen(value)) rows = 2;
|
||||
if (lcd_strlen_P(pstr) > LCD_WIDTH - 2 - lcd_strlen(value)) rows = 2;
|
||||
|
||||
const float kHalfChar = DOG_CHAR_HEIGHT_EDIT / 2;
|
||||
float rowHeight = u8g.getHeight() / (rows + 1); // 1/(rows+1) = 1/2 or 1/3
|
||||
@ -396,7 +396,7 @@ void lcd_implementation_drawedit(const char* pstr, char* value) {
|
||||
u8g.setPrintPos(0, rowHeight + kHalfChar);
|
||||
lcd_printPGM(pstr);
|
||||
u8g.print(':');
|
||||
u8g.setPrintPos((lcd_width-1-strlen(value)) * char_width, rows * rowHeight + kHalfChar);
|
||||
u8g.setPrintPos((lcd_width-1-lcd_strlen(value)) * char_width, rows * rowHeight + kHalfChar);
|
||||
u8g.print(value);
|
||||
}
|
||||
|
||||
|
@ -284,6 +284,11 @@
|
||||
//=============================Additional Features===========================
|
||||
//===========================================================================
|
||||
|
||||
#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
|
||||
#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
|
||||
#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
|
||||
//#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value
|
||||
|
||||
//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
|
||||
#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
|
||||
|
||||
|
@ -284,6 +284,11 @@
|
||||
//=============================Additional Features===========================
|
||||
//===========================================================================
|
||||
|
||||
#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
|
||||
#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
|
||||
#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
|
||||
//#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value
|
||||
|
||||
//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
|
||||
#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
|
||||
|
||||
|
@ -287,6 +287,11 @@
|
||||
//=============================Additional Features===========================
|
||||
//===========================================================================
|
||||
|
||||
#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
|
||||
#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
|
||||
#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
|
||||
//#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value
|
||||
|
||||
//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
|
||||
#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
|
||||
|
||||
|
@ -284,6 +284,11 @@
|
||||
//=============================Additional Features===========================
|
||||
//===========================================================================
|
||||
|
||||
#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
|
||||
#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
|
||||
#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
|
||||
//#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value
|
||||
|
||||
//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
|
||||
#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
|
||||
|
||||
|
@ -279,6 +279,11 @@
|
||||
//=============================Additional Features===========================
|
||||
//===========================================================================
|
||||
|
||||
#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
|
||||
#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
|
||||
#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
|
||||
//#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value
|
||||
|
||||
//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
|
||||
#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
|
||||
|
||||
|
@ -283,6 +283,11 @@
|
||||
//=============================Additional Features===========================
|
||||
//===========================================================================
|
||||
|
||||
#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
|
||||
#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
|
||||
#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
|
||||
//#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value
|
||||
|
||||
//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
|
||||
#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
|
||||
|
||||
|
@ -284,6 +284,11 @@
|
||||
//=============================Additional Features===========================
|
||||
//===========================================================================
|
||||
|
||||
#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
|
||||
#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
|
||||
#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
|
||||
//#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value
|
||||
|
||||
//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
|
||||
#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
#define WELCOME_MSG MACHINE_NAME " Готов."
|
||||
#define MSG_SD_INSERTED "Карта вставлена"
|
||||
#define MSG_SD_REMOVED "Карта извлечена"
|
||||
#define MSG_MAIN "Меню \003"
|
||||
#define MSG_MAIN "Меню"
|
||||
#define MSG_AUTOSTART "Автостарт"
|
||||
#define MSG_DISABLE_STEPPERS "Выкл. двигатели"
|
||||
#define MSG_AUTO_HOME "Парковка"
|
||||
@ -43,14 +43,14 @@
|
||||
#define MSG_MOVE_1MM "Move 1mm"
|
||||
#define MSG_MOVE_10MM "Move 10mm"
|
||||
#define MSG_SPEED "Скорость"
|
||||
#define MSG_NOZZLE "\002 Фильера"
|
||||
#define MSG_BED "\002 Кровать"
|
||||
#define MSG_NOZZLE LCD_STR_THERMOMETER " Фильера"
|
||||
#define MSG_BED LCD_STR_THERMOMETER " Кровать"
|
||||
#define MSG_FAN_SPEED "Куллер"
|
||||
#define MSG_FLOW "Поток"
|
||||
#define MSG_CONTROL "Настройки \003"
|
||||
#define MSG_MIN "\002 Минимум"
|
||||
#define MSG_MAX "\002 Максимум"
|
||||
#define MSG_FACTOR "\002 Фактор"
|
||||
#define MSG_CONTROL "Настройки"
|
||||
#define MSG_MIN LCD_STR_THERMOMETER " Минимум"
|
||||
#define MSG_MAX LCD_STR_THERMOMETER " Максимум"
|
||||
#define MSG_FACTOR LCD_STR_THERMOMETER " Фактор"
|
||||
#define MSG_AUTOTEMP "Autotemp"
|
||||
#define MSG_ON "Вкл. "
|
||||
#define MSG_OFF "Выкл. "
|
||||
@ -75,8 +75,8 @@
|
||||
#define MSG_YSTEPS "Y шаг/mm"
|
||||
#define MSG_ZSTEPS "Z шаг/mm"
|
||||
#define MSG_ESTEPS "E шаг/mm"
|
||||
#define MSG_TEMPERATURE "Температура \x7E"
|
||||
#define MSG_MOTION "Скорости \x7E"
|
||||
#define MSG_TEMPERATURE "Температура"
|
||||
#define MSG_MOTION "Скорости"
|
||||
#define MSG_VOLUMETRIC "Filament"
|
||||
#define MSG_VOLUMETRIC_ENABLED "E in mm3"
|
||||
#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1"
|
||||
@ -86,14 +86,14 @@
|
||||
#define MSG_STORE_EPROM "Сохранить в EPROM"
|
||||
#define MSG_LOAD_EPROM "Загруз. из EPROM"
|
||||
#define MSG_RESTORE_FAILSAFE "Сброс настроек"
|
||||
#define MSG_REFRESH "\004Обновить"
|
||||
#define MSG_WATCH "Обзор \003"
|
||||
#define MSG_PREPARE "Действия \x7E"
|
||||
#define MSG_TUNE "Настройки \x7E"
|
||||
#define MSG_REFRESH LCD_STR_REFRESH "Обновить"
|
||||
#define MSG_WATCH "Обзор"
|
||||
#define MSG_PREPARE "Действия"
|
||||
#define MSG_TUNE "Настройки"
|
||||
#define MSG_PAUSE_PRINT "Продолжить печать"
|
||||
#define MSG_RESUME_PRINT "возобн. печать"
|
||||
#define MSG_STOP_PRINT "Остановить печать"
|
||||
#define MSG_CARD_MENU "Меню карты \x7E"
|
||||
#define MSG_CARD_MENU "Меню карты"
|
||||
#define MSG_NO_CARD "Нет карты"
|
||||
#define MSG_DWELL "Сон..."
|
||||
#define MSG_USERWAIT "Ожиданиие"
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include "pins_SETHI.h"
|
||||
#elif MB(RAMPS_OLD)
|
||||
#include "pins_RAMPS_OLD.h"
|
||||
#elif IS_RAMPS
|
||||
#elif MB(RAMPS_13_EFB) || MB(RAMPS_13_EEB) || MB(RAMPS_13_EFF) || MB(RAMPS_13_EEF)
|
||||
#include "pins_RAMPS_13.h"
|
||||
#elif MB(DUEMILANOVE_328P)
|
||||
#include "pins_DUEMILANOVE_328P.h"
|
||||
@ -110,6 +110,10 @@
|
||||
#include "pins_WITBOX.h"
|
||||
#elif MB(HEPHESTOS)
|
||||
#include "pins_HEPHESTOS.h"
|
||||
#elif MB(BAM_DICE)
|
||||
#include "pins_RAMPS_13.h"
|
||||
#elif MB(BAM_DICE_DUE)
|
||||
#include "pins_BAM_DICE_DUE.h"
|
||||
#elif MB(99)
|
||||
#include "pins_99.h"
|
||||
#else
|
||||
|
@ -3,3 +3,11 @@
|
||||
*/
|
||||
|
||||
#include "pins_RAMPS_13.h"
|
||||
|
||||
#define FAN_PIN 9 // (Sprinter config)
|
||||
#define HEATER_1_PIN -1
|
||||
|
||||
#ifdef TEMP_STAT_LEDS
|
||||
#define STAT_LED_RED 6
|
||||
#define STAT_LED_BLUE 11
|
||||
#endif
|
||||
|
@ -4,6 +4,9 @@
|
||||
|
||||
#include "pins_RAMPS_13.h"
|
||||
|
||||
#define FAN_PIN 9 // (Sprinter config)
|
||||
#define BEEPER 33
|
||||
|
||||
#define E2_STEP_PIN 23
|
||||
#define E2_DIR_PIN 25
|
||||
#define E2_ENABLE_PIN 40
|
||||
@ -16,6 +19,7 @@
|
||||
#define E4_DIR_PIN 37
|
||||
#define E4_ENABLE_PIN 42
|
||||
|
||||
#define HEATER_1_PIN -1
|
||||
#define HEATER_2_PIN 16
|
||||
#define HEATER_3_PIN 17
|
||||
#define HEATER_4_PIN 4
|
||||
|
11
Marlin/pins_BAM_DICE_DUE.h
Normal file
11
Marlin/pins_BAM_DICE_DUE.h
Normal file
@ -0,0 +1,11 @@
|
||||
/**
|
||||
* BAM&DICE Due (Arduino Mega) pin assignments
|
||||
*/
|
||||
|
||||
#include "pins_RAMPS_13.h"
|
||||
|
||||
#define FAN_PIN 9 // (Sprinter config)
|
||||
#define HEATER_1_PIN -1
|
||||
|
||||
#define TEMP_0_PIN 9 // ANALOG NUMBERING
|
||||
#define TEMP_1_PIN 11 // ANALOG NUMBERING
|
@ -3,3 +3,6 @@
|
||||
*/
|
||||
|
||||
#include "pins_RAMPS_13.h"
|
||||
|
||||
#define FAN_PIN 9 // (Sprinter config)
|
||||
#define HEATER_1_PIN -1
|
||||
|
@ -7,10 +7,8 @@
|
||||
* RAMPS_13_EEB (Extruder, Extruder, Bed)
|
||||
* RAMPS_13_EFF (Extruder, Fan, Fan)
|
||||
* RAMPS_13_EEF (Extruder, Extruder, Fan)
|
||||
* 3DRAG
|
||||
* K8200
|
||||
* AZTEEG_X3
|
||||
* AZTEEG_X3_PRO
|
||||
*
|
||||
* Other pins_MYBOARD.h files may override these defaults
|
||||
*/
|
||||
|
||||
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
|
||||
@ -63,7 +61,7 @@
|
||||
#define FILWIDTH_PIN 5
|
||||
#endif
|
||||
|
||||
#if MB(RAMPS_13_EFB) || MB(RAMPS_13_EFF) || MB(AZTEEG_X3) || MB(AZTEEG_X3_PRO) || MB(WITBOX) || MB(HEPHESTOS)
|
||||
#if MB(RAMPS_13_EFB) || MB(RAMPS_13_EFF)
|
||||
#define FAN_PIN 9 // (Sprinter config)
|
||||
#if MB(RAMPS_13_EFF)
|
||||
#define CONTROLLERFAN_PIN -1 // Pin used for the fan to cool controller
|
||||
@ -88,7 +86,7 @@
|
||||
#define HEATER_0_PIN 10 // EXTRUDER 1
|
||||
#endif
|
||||
|
||||
#if MB(RAMPS_13_EFB) || MB(AZTEEG_X3) || MB(WITBOX) || MB(HEPHESTOS)
|
||||
#if MB(RAMPS_13_EFB)
|
||||
#define HEATER_1_PIN -1
|
||||
#else
|
||||
#define HEATER_1_PIN 9 // EXTRUDER 2 (FAN On Sprinter)
|
||||
@ -110,28 +108,14 @@
|
||||
|
||||
#ifdef NUM_SERVOS
|
||||
#define SERVO0_PIN 11
|
||||
|
||||
#if NUM_SERVOS > 1
|
||||
#define SERVO1_PIN 6
|
||||
#endif
|
||||
|
||||
#if NUM_SERVOS > 2
|
||||
#define SERVO2_PIN 5
|
||||
#endif
|
||||
|
||||
#if NUM_SERVOS > 3
|
||||
#define SERVO3_PIN 4
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if MB(AZTEEG_X3_PRO)
|
||||
#define BEEPER 33
|
||||
#endif
|
||||
|
||||
#ifdef TEMP_STAT_LEDS
|
||||
#if MB(AZTEEG_X3)
|
||||
#define STAT_LED_RED 6
|
||||
#define STAT_LED_BLUE 11
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -3,3 +3,6 @@
|
||||
*/
|
||||
|
||||
#include "pins_RAMPS_13.h"
|
||||
|
||||
#define FAN_PIN 9 // (Sprinter config)
|
||||
#define HEATER_1_PIN -1
|
||||
|
@ -460,14 +460,12 @@ void checkExtruderAutoFans()
|
||||
#endif
|
||||
#if defined(EXTRUDER_2_AUTO_FAN_PIN) && EXTRUDER_2_AUTO_FAN_PIN > -1
|
||||
if (EXTRUDER_2_AUTO_FAN_PIN != EXTRUDER_0_AUTO_FAN_PIN
|
||||
&& EXTRUDER_2_AUTO_FAN_PIN != EXTRUDER_0_AUTO_FAN_PIN)
|
||||
&& EXTRUDER_2_AUTO_FAN_PIN != EXTRUDER_1_AUTO_FAN_PIN)
|
||||
setExtruderAutoFanState(EXTRUDER_2_AUTO_FAN_PIN, (fanState & 4) != 0);
|
||||
#endif
|
||||
#if defined(EXTRUDER_3_AUTO_FAN_PIN) && EXTRUDER_3_AUTO_FAN_PIN > -1
|
||||
if (EXTRUDER_3_AUTO_FAN_PIN != EXTRUDER_0_AUTO_FAN_PIN
|
||||
&& EXTRUDER_3_AUTO_FAN_PIN != EXTRUDER_0_AUTO_FAN_PIN)
|
||||
&& EXTRUDER_3_AUTO_FAN_PIN != EXTRUDER_1_AUTO_FAN_PIN)
|
||||
&& EXTRUDER_3_AUTO_FAN_PIN != EXTRUDER_1_AUTO_FAN_PIN
|
||||
&& EXTRUDER_3_AUTO_FAN_PIN != EXTRUDER_2_AUTO_FAN_PIN)
|
||||
setExtruderAutoFanState(EXTRUDER_3_AUTO_FAN_PIN, (fanState & 8) != 0);
|
||||
#endif
|
||||
|
@ -1095,6 +1095,16 @@ const short temptable_1047[][2] PROGMEM = {
|
||||
};
|
||||
#endif
|
||||
|
||||
#if (THERMISTORHEATER_0 == 999) || (THERMISTORHEATER_1 == 999) || (THERMISTORHEATER_2 == 999) || (THERMISTORHEATER_3 == 999) || (THERMISTORBED == 999) //User defined table
|
||||
// Dummy Thermistor table.. It will ALWAYS read 25C.
|
||||
const short temptable_999[][2] PROGMEM = {
|
||||
{1*OVERSAMPLENR, 25},
|
||||
{1023*OVERSAMPLENR, 25}
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define _TT_NAME(_N) temptable_ ## _N
|
||||
#define TT_NAME(_N) _TT_NAME(_N)
|
||||
|
||||
|
@ -10,6 +10,9 @@
|
||||
|
||||
int8_t encoderDiff; /* encoderDiff is updated from interrupt context and added to encoderPosition every LCD update */
|
||||
|
||||
bool encoderRateMultiplierEnabled;
|
||||
int32_t lastEncoderMovementMillis;
|
||||
|
||||
/* Configuration settings */
|
||||
int plaPreheatHotendTemp;
|
||||
int plaPreheatHPBTemp;
|
||||
@ -41,11 +44,6 @@ char lcd_status_message[LCD_WIDTH+1] = WELCOME_MSG;
|
||||
#include "ultralcd_implementation_hitachi_HD44780.h"
|
||||
#endif
|
||||
|
||||
/** forward declarations **/
|
||||
|
||||
void copy_and_scalePID_i();
|
||||
void copy_and_scalePID_d();
|
||||
|
||||
/* Different menus */
|
||||
static void lcd_status_screen();
|
||||
#ifdef ULTIPANEL
|
||||
@ -119,6 +117,7 @@ static void menu_action_setting_edit_callback_long5(const char* pstr, unsigned l
|
||||
|
||||
/* Helper macros for menus */
|
||||
#define START_MENU() do { \
|
||||
encoderRateMultiplierEnabled = false; \
|
||||
if (encoderPosition > 0x8000) encoderPosition = 0; \
|
||||
if (encoderPosition / ENCODER_STEPS_PER_MENU_ITEM < currentMenuViewOffset) currentMenuViewOffset = encoderPosition / ENCODER_STEPS_PER_MENU_ITEM;\
|
||||
uint8_t _lineNr = currentMenuViewOffset, _menuItemNr; \
|
||||
@ -143,9 +142,39 @@ static void menu_action_setting_edit_callback_long5(const char* pstr, unsigned l
|
||||
}\
|
||||
_menuItemNr++;\
|
||||
} while(0)
|
||||
#ifdef ENCODER_RATE_MULTIPLIER
|
||||
#define MENU_MULTIPLIER_ITEM(type, label, args...) do { \
|
||||
if (_menuItemNr == _lineNr) { \
|
||||
if (lcdDrawUpdate) { \
|
||||
const char* _label_pstr = PSTR(label); \
|
||||
if ((encoderPosition / ENCODER_STEPS_PER_MENU_ITEM) == _menuItemNr) { \
|
||||
lcd_implementation_drawmenu_ ## type ## _selected (_drawLineNr, _label_pstr , ## args ); \
|
||||
} \
|
||||
else { \
|
||||
lcd_implementation_drawmenu_ ## type (_drawLineNr, _label_pstr , ## args ); \
|
||||
} \
|
||||
} \
|
||||
if (wasClicked && (encoderPosition / ENCODER_STEPS_PER_MENU_ITEM) == _menuItemNr) { \
|
||||
lcd_quick_feedback(); \
|
||||
encoderRateMultiplierEnabled = true; \
|
||||
lastEncoderMovementMillis = 0; \
|
||||
menu_action_ ## type ( args ); \
|
||||
return; \
|
||||
} \
|
||||
} \
|
||||
_menuItemNr++; \
|
||||
} while(0)
|
||||
#endif //ENCODER_RATE_MULTIPLIER
|
||||
#define MENU_ITEM_DUMMY() do { _menuItemNr++; } while(0)
|
||||
#define MENU_ITEM_EDIT(type, label, args...) MENU_ITEM(setting_edit_ ## type, label, PSTR(label) , ## args )
|
||||
#define MENU_ITEM_EDIT_CALLBACK(type, label, args...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label) , ## args )
|
||||
#ifdef ENCODER_RATE_MULTIPLIER
|
||||
#define MENU_MULTIPLIER_ITEM_EDIT(type, label, args...) MENU_MULTIPLIER_ITEM(setting_edit_ ## type, label, PSTR(label) , ## args )
|
||||
#define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(type, label, args...) MENU_MULTIPLIER_ITEM(setting_edit_callback_ ## type, label, PSTR(label) , ## args )
|
||||
#else //!ENCODER_RATE_MULTIPLIER
|
||||
#define MENU_MULTIPLIER_ITEM_EDIT(type, label, args...) MENU_ITEM(setting_edit_ ## type, label, PSTR(label) , ## args )
|
||||
#define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(type, label, args...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label) , ## args )
|
||||
#endif //!ENCODER_RATE_MULTIPLIER
|
||||
#define END_MENU() \
|
||||
if (encoderPosition / ENCODER_STEPS_PER_MENU_ITEM >= _menuItemNr) encoderPosition = _menuItemNr * ENCODER_STEPS_PER_MENU_ITEM - 1; \
|
||||
if ((uint8_t)(encoderPosition / ENCODER_STEPS_PER_MENU_ITEM) >= currentMenuViewOffset + LCD_HEIGHT) { currentMenuViewOffset = (encoderPosition / ENCODER_STEPS_PER_MENU_ITEM) - LCD_HEIGHT + 1; lcdDrawUpdate = 1; _lineNr = currentMenuViewOffset - 1; _drawLineNr = -1; } \
|
||||
@ -185,9 +214,8 @@ void* editValue;
|
||||
int32_t minEditValue, maxEditValue;
|
||||
menuFunc_t callbackFunc;
|
||||
|
||||
// place-holders for Ki and Kd edits, and the extruder # being edited
|
||||
// place-holders for Ki and Kd edits
|
||||
float raw_Ki, raw_Kd;
|
||||
int pid_current_extruder;
|
||||
|
||||
static void lcd_goto_menu(menuFunc_t menu, const uint32_t encoder=0, const bool feedback=true) {
|
||||
if (currentMenu != menu) {
|
||||
@ -205,6 +233,7 @@ static void lcd_goto_menu(menuFunc_t menu, const uint32_t encoder=0, const bool
|
||||
/* Main status screen. It's up to the implementation specific part to show what is needed. As this is very display dependent */
|
||||
static void lcd_status_screen()
|
||||
{
|
||||
encoderRateMultiplierEnabled = false;
|
||||
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT) && !defined(DOGLCD)
|
||||
uint16_t mil = millis();
|
||||
#ifndef PROGRESS_MSG_ONCE
|
||||
@ -423,23 +452,23 @@ static void lcd_tune_menu()
|
||||
MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
|
||||
MENU_ITEM_EDIT(int3, MSG_SPEED, &feedmultiply, 10, 999);
|
||||
#if TEMP_SENSOR_0 != 0
|
||||
MENU_ITEM_EDIT(int3, MSG_NOZZLE, &target_temperature[0], 0, HEATER_0_MAXTEMP - 15);
|
||||
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_NOZZLE, &target_temperature[0], 0, HEATER_0_MAXTEMP - 15);
|
||||
#endif
|
||||
#if TEMP_SENSOR_1 != 0
|
||||
MENU_ITEM_EDIT(int3, MSG_NOZZLE " 2", &target_temperature[1], 0, HEATER_1_MAXTEMP - 15);
|
||||
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_NOZZLE " 2", &target_temperature[1], 0, HEATER_1_MAXTEMP - 15);
|
||||
#endif
|
||||
#if TEMP_SENSOR_2 != 0
|
||||
MENU_ITEM_EDIT(int3, MSG_NOZZLE " 3", &target_temperature[2], 0, HEATER_2_MAXTEMP - 15);
|
||||
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_NOZZLE " 3", &target_temperature[2], 0, HEATER_2_MAXTEMP - 15);
|
||||
#endif
|
||||
#if TEMP_SENSOR_3 != 0
|
||||
MENU_ITEM_EDIT(int3, MSG_NOZZLE " 4", &target_temperature[3], 0, HEATER_3_MAXTEMP - 15);
|
||||
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_NOZZLE " 4", &target_temperature[3], 0, HEATER_3_MAXTEMP - 15);
|
||||
#endif
|
||||
|
||||
|
||||
#if TEMP_SENSOR_BED != 0
|
||||
MENU_ITEM_EDIT(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP - 15);
|
||||
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP - 15);
|
||||
#endif
|
||||
MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &fanSpeed, 0, 255);
|
||||
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_FAN_SPEED, &fanSpeed, 0, 255);
|
||||
MENU_ITEM_EDIT(int3, MSG_FLOW, &extrudemultiply, 10, 999);
|
||||
MENU_ITEM_EDIT(int3, MSG_FLOW " 0", &extruder_multiply[0], 10, 999);
|
||||
#if TEMP_SENSOR_1 != 0
|
||||
@ -811,73 +840,121 @@ static void lcd_control_menu()
|
||||
END_MENU();
|
||||
}
|
||||
|
||||
#ifdef PIDTEMP
|
||||
|
||||
// Helpers for editing PID Ki & Kd values
|
||||
// grab the PID value out of the temp variable; scale it; then update the PID driver
|
||||
void copy_and_scalePID_i(int e) {
|
||||
PID_PARAM(Ki, e) = scalePID_i(raw_Ki);
|
||||
updatePID();
|
||||
}
|
||||
void copy_and_scalePID_d(int e) {
|
||||
PID_PARAM(Kd, e) = scalePID_d(raw_Kd);
|
||||
updatePID();
|
||||
}
|
||||
void copy_and_scalePID_i_E1() { copy_and_scalePID_i(0); }
|
||||
void copy_and_scalePID_d_E1() { copy_and_scalePID_d(0); }
|
||||
#ifdef PID_PARAMS_PER_EXTRUDER
|
||||
#if EXTRUDERS > 1
|
||||
void copy_and_scalePID_i_E2() { copy_and_scalePID_i(1); }
|
||||
void copy_and_scalePID_d_E2() { copy_and_scalePID_d(1); }
|
||||
#if EXTRUDERS > 2
|
||||
void copy_and_scalePID_i_E3() { copy_and_scalePID_i(2); }
|
||||
void copy_and_scalePID_d_E3() { copy_and_scalePID_d(2); }
|
||||
#if EXTRUDERS > 3
|
||||
void copy_and_scalePID_i_E4() { copy_and_scalePID_i(3); }
|
||||
void copy_and_scalePID_d_E4() { copy_and_scalePID_d(3); }
|
||||
#endif //EXTRUDERS > 3
|
||||
#endif //EXTRUDERS > 2
|
||||
#endif //EXTRUDERS > 1
|
||||
#endif //PID_PARAMS_PER_EXTRUDER
|
||||
|
||||
#endif //PIDTEMP
|
||||
|
||||
static void lcd_control_temperature_menu()
|
||||
{
|
||||
START_MENU();
|
||||
MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
|
||||
#if TEMP_SENSOR_0 != 0
|
||||
MENU_ITEM_EDIT(int3, MSG_NOZZLE, &target_temperature[0], 0, HEATER_0_MAXTEMP - 15);
|
||||
#endif
|
||||
#if TEMP_SENSOR_1 != 0 && EXTRUDERS > 1
|
||||
MENU_ITEM_EDIT(int3, MSG_NOZZLE " 2", &target_temperature[1], 0, HEATER_1_MAXTEMP - 15);
|
||||
#endif
|
||||
#if TEMP_SENSOR_2 != 0 && EXTRUDERS > 2
|
||||
MENU_ITEM_EDIT(int3, MSG_NOZZLE " 3", &target_temperature[2], 0, HEATER_2_MAXTEMP - 15);
|
||||
#endif
|
||||
#if TEMP_SENSOR_3 != 0 && EXTRUDERS > 3
|
||||
MENU_ITEM_EDIT(int3, MSG_NOZZLE " 4", &target_temperature[3], 0, HEATER_3_MAXTEMP - 15);
|
||||
#endif
|
||||
#if TEMP_SENSOR_BED != 0
|
||||
MENU_ITEM_EDIT(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP - 15);
|
||||
#endif
|
||||
MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &fanSpeed, 0, 255);
|
||||
#if defined AUTOTEMP && (TEMP_SENSOR_0 != 0)
|
||||
#if TEMP_SENSOR_0 != 0
|
||||
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_NOZZLE, &target_temperature[0], 0, HEATER_0_MAXTEMP - 15);
|
||||
#endif
|
||||
#if EXTRUDERS > 1
|
||||
#if TEMP_SENSOR_1 != 0
|
||||
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_NOZZLE " 2", &target_temperature[1], 0, HEATER_1_MAXTEMP - 15);
|
||||
#endif
|
||||
#if EXTRUDERS > 2
|
||||
#if TEMP_SENSOR_2 != 0
|
||||
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_NOZZLE " 3", &target_temperature[2], 0, HEATER_2_MAXTEMP - 15);
|
||||
#endif
|
||||
#if EXTRUDERS > 3
|
||||
#if TEMP_SENSOR_3 != 0
|
||||
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_NOZZLE " 4", &target_temperature[3], 0, HEATER_3_MAXTEMP - 15);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if TEMP_SENSOR_BED != 0
|
||||
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP - 15);
|
||||
#endif
|
||||
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_FAN_SPEED, &fanSpeed, 0, 255);
|
||||
#if defined(AUTOTEMP) && (TEMP_SENSOR_0 != 0)
|
||||
MENU_ITEM_EDIT(bool, MSG_AUTOTEMP, &autotemp_enabled);
|
||||
MENU_ITEM_EDIT(float3, MSG_MIN, &autotemp_min, 0, HEATER_0_MAXTEMP - 15);
|
||||
MENU_ITEM_EDIT(float3, MSG_MAX, &autotemp_max, 0, HEATER_0_MAXTEMP - 15);
|
||||
MENU_ITEM_EDIT(float32, MSG_FACTOR, &autotemp_factor, 0.0, 1.0);
|
||||
#endif
|
||||
#ifdef PIDTEMP
|
||||
#endif
|
||||
#ifdef PIDTEMP
|
||||
// set up temp variables - undo the default scaling
|
||||
pid_current_extruder = 0;
|
||||
raw_Ki = unscalePID_i(PID_PARAM(Ki,0));
|
||||
raw_Kd = unscalePID_d(PID_PARAM(Kd,0));
|
||||
MENU_ITEM_EDIT(float52, MSG_PID_P, &PID_PARAM(Kp,0), 1, 9990);
|
||||
// i is typically a small value so allows values below 1
|
||||
MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_I, &raw_Ki, 0.01, 9990, copy_and_scalePID_i);
|
||||
MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_D, &raw_Kd, 1, 9990, copy_and_scalePID_d);
|
||||
MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_I, &raw_Ki, 0.01, 9990, copy_and_scalePID_i_E1);
|
||||
MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_D, &raw_Kd, 1, 9990, copy_and_scalePID_d_E1);
|
||||
#ifdef PID_ADD_EXTRUSION_RATE
|
||||
MENU_ITEM_EDIT(float3, MSG_PID_C, &PID_PARAM(Kc,0), 1, 9990);
|
||||
#endif//PID_ADD_EXTRUSION_RATE
|
||||
#ifdef PID_PARAMS_PER_EXTRUDER
|
||||
#ifdef PID_PARAMS_PER_EXTRUDER
|
||||
#if EXTRUDERS > 1
|
||||
// set up temp variables - undo the default scaling
|
||||
pid_current_extruder = 0;
|
||||
raw_Ki = unscalePID_i(PID_PARAM(Ki,1));
|
||||
raw_Kd = unscalePID_d(PID_PARAM(Kd,1));
|
||||
MENU_ITEM_EDIT(float52, MSG_PID_P " E2", &PID_PARAM(Kp,1), 1, 9990);
|
||||
// i is typically a small value so allows values below 1
|
||||
MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_I " E2", &raw_Ki, 0.01, 9990, copy_and_scalePID_i);
|
||||
MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_D " E2", &raw_Kd, 1, 9990, copy_and_scalePID_d);
|
||||
MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_I " E2", &raw_Ki, 0.01, 9990, copy_and_scalePID_i_E2);
|
||||
MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_D " E2", &raw_Kd, 1, 9990, copy_and_scalePID_d_E2);
|
||||
#ifdef PID_ADD_EXTRUSION_RATE
|
||||
MENU_ITEM_EDIT(float3, MSG_PID_C " E2", &PID_PARAM(Kc,1), 1, 9990);
|
||||
#endif//PID_ADD_EXTRUSION_RATE
|
||||
#endif//EXTRUDERS > 1
|
||||
|
||||
#if EXTRUDERS > 2
|
||||
// set up temp variables - undo the default scaling
|
||||
pid_current_extruder = 0;
|
||||
raw_Ki = unscalePID_i(PID_PARAM(Ki,2));
|
||||
raw_Kd = unscalePID_d(PID_PARAM(Kd,2));
|
||||
MENU_ITEM_EDIT(float52, MSG_PID_P " E3", &PID_PARAM(Kp,2), 1, 9990);
|
||||
// i is typically a small value so allows values below 1
|
||||
MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_I " E3", &raw_Ki, 0.01, 9990, copy_and_scalePID_i);
|
||||
MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_D " E3", &raw_Kd, 1, 9990, copy_and_scalePID_d);
|
||||
MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_I " E3", &raw_Ki, 0.01, 9990, copy_and_scalePID_i_E3);
|
||||
MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_D " E3", &raw_Kd, 1, 9990, copy_and_scalePID_d_E3);
|
||||
#ifdef PID_ADD_EXTRUSION_RATE
|
||||
MENU_ITEM_EDIT(float3, MSG_PID_C " E3", &PID_PARAM(Kc,2), 1, 9990);
|
||||
#endif//PID_ADD_EXTRUSION_RATE
|
||||
|
||||
#if EXTRUDERS > 3
|
||||
// set up temp variables - undo the default scaling
|
||||
raw_Ki = unscalePID_i(PID_PARAM(Ki,3));
|
||||
raw_Kd = unscalePID_d(PID_PARAM(Kd,3));
|
||||
MENU_ITEM_EDIT(float52, MSG_PID_P " E4", &PID_PARAM(Kp,3), 1, 9990);
|
||||
// i is typically a small value so allows values below 1
|
||||
MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_I " E4", &raw_Ki, 0.01, 9990, copy_and_scalePID_i_E4);
|
||||
MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_D " E4", &raw_Kd, 1, 9990, copy_and_scalePID_d_E4);
|
||||
#ifdef PID_ADD_EXTRUSION_RATE
|
||||
MENU_ITEM_EDIT(float3, MSG_PID_C " E4", &PID_PARAM(Kc,3), 1, 9990);
|
||||
#endif//PID_ADD_EXTRUSION_RATE
|
||||
#endif//EXTRUDERS > 3
|
||||
#endif//EXTRUDERS > 2
|
||||
#endif // PID_PARAMS_PER_EXTRUDER
|
||||
#endif//PIDTEMP
|
||||
#endif//EXTRUDERS > 1
|
||||
#endif //PID_PARAMS_PER_EXTRUDER
|
||||
#endif//PIDTEMP
|
||||
MENU_ITEM(submenu, MSG_PREHEAT_PLA_SETTINGS, lcd_control_temperature_preheat_pla_settings_menu);
|
||||
MENU_ITEM(submenu, MSG_PREHEAT_ABS_SETTINGS, lcd_control_temperature_preheat_abs_settings_menu);
|
||||
END_MENU();
|
||||
@ -961,16 +1038,16 @@ static void lcd_control_volumetric_menu()
|
||||
MENU_ITEM_EDIT_CALLBACK(bool, MSG_VOLUMETRIC_ENABLED, &volumetric_enabled, calculate_volumetric_multipliers);
|
||||
|
||||
if (volumetric_enabled) {
|
||||
MENU_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_SIZE_EXTRUDER_0, &filament_size[0], DEFAULT_NOMINAL_FILAMENT_DIA - .5, DEFAULT_NOMINAL_FILAMENT_DIA + .5, calculate_volumetric_multipliers);
|
||||
#if EXTRUDERS > 1
|
||||
MENU_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_SIZE_EXTRUDER_1, &filament_size[1], DEFAULT_NOMINAL_FILAMENT_DIA - .5, DEFAULT_NOMINAL_FILAMENT_DIA + .5, calculate_volumetric_multipliers);
|
||||
#if EXTRUDERS > 2
|
||||
MENU_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_SIZE_EXTRUDER_2, &filament_size[2], DEFAULT_NOMINAL_FILAMENT_DIA - .5, DEFAULT_NOMINAL_FILAMENT_DIA + .5, calculate_volumetric_multipliers);
|
||||
#if EXTRUDERS > 3
|
||||
MENU_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_SIZE_EXTRUDER_3, &filament_size[3], DEFAULT_NOMINAL_FILAMENT_DIA - .5, DEFAULT_NOMINAL_FILAMENT_DIA + .5, calculate_volumetric_multipliers);
|
||||
#endif //EXTRUDERS > 3
|
||||
#endif //EXTRUDERS > 2
|
||||
#endif //EXTRUDERS > 1
|
||||
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_SIZE_EXTRUDER_0, &filament_size[0], 1.5, 3.25, calculate_volumetric_multipliers);
|
||||
#if EXTRUDERS > 1
|
||||
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_SIZE_EXTRUDER_1, &filament_size[1], 1.5, 3.25, calculate_volumetric_multipliers);
|
||||
#if EXTRUDERS > 2
|
||||
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_SIZE_EXTRUDER_2, &filament_size[2], 1.5, 3.25, calculate_volumetric_multipliers);
|
||||
#if EXTRUDERS > 3
|
||||
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_SIZE_EXTRUDER_3, &filament_size[3], 1.5, 3.25, calculate_volumetric_multipliers);
|
||||
#endif //EXTRUDERS > 3
|
||||
#endif //EXTRUDERS > 2
|
||||
#endif //EXTRUDERS > 1
|
||||
}
|
||||
|
||||
END_MENU();
|
||||
@ -1260,6 +1337,26 @@ void lcd_init()
|
||||
#endif
|
||||
}
|
||||
|
||||
int lcd_strlen(char *s) {
|
||||
int i = 0, j = 0;
|
||||
while (s[i]) {
|
||||
if ((s[i] & 0xc0) != 0x80) j++;
|
||||
i++;
|
||||
}
|
||||
return j;
|
||||
}
|
||||
|
||||
int lcd_strlen_P(const char *s) {
|
||||
int j = 0;
|
||||
while (pgm_read_byte(s)) {
|
||||
if ((pgm_read_byte(s) & 0xc0) != 0x80) j++;
|
||||
s++;
|
||||
}
|
||||
return j;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void lcd_update()
|
||||
{
|
||||
static unsigned long timeoutToStatus = 0;
|
||||
@ -1322,8 +1419,41 @@ void lcd_update()
|
||||
#endif
|
||||
if (abs(encoderDiff) >= ENCODER_PULSES_PER_STEP)
|
||||
{
|
||||
int32_t encoderMultiplier = 1;
|
||||
|
||||
#ifdef ENCODER_RATE_MULTIPLIER
|
||||
|
||||
if (encoderRateMultiplierEnabled) {
|
||||
int32_t encoderMovementSteps = abs(encoderDiff) / ENCODER_PULSES_PER_STEP;
|
||||
|
||||
if (lastEncoderMovementMillis != 0) {
|
||||
// Note that the rate is always calculated between to passes through the
|
||||
// loop and that the abs of the encoderDiff value is tracked.
|
||||
float encoderStepRate =
|
||||
(float)(encoderMovementSteps) / ((float)(millis() - lastEncoderMovementMillis)) * 1000.0;
|
||||
|
||||
if (encoderStepRate >= ENCODER_100X_STEPS_PER_SEC) encoderMultiplier = 100;
|
||||
else if (encoderStepRate >= ENCODER_10X_STEPS_PER_SEC) encoderMultiplier = 10;
|
||||
|
||||
#ifdef ENCODER_RATE_MULTIPLIER_DEBUG
|
||||
SERIAL_ECHO_START;
|
||||
SERIAL_ECHO("Enc Step Rate: ");
|
||||
SERIAL_ECHO(encoderStepRate);
|
||||
SERIAL_ECHO(" Multiplier: ");
|
||||
SERIAL_ECHO(encoderMultiplier);
|
||||
SERIAL_ECHO(" ENCODER_10X_STEPS_PER_SEC: ");
|
||||
SERIAL_ECHO(ENCODER_10X_STEPS_PER_SEC);
|
||||
SERIAL_ECHO(" ENCODER_100X_STEPS_PER_SEC: ");
|
||||
SERIAL_ECHOLN(ENCODER_100X_STEPS_PER_SEC);
|
||||
#endif //ENCODER_RATE_MULTIPLIER_DEBUG
|
||||
}
|
||||
|
||||
lastEncoderMovementMillis = millis();
|
||||
}
|
||||
#endif //ENCODER_RATE_MULTIPLIER
|
||||
|
||||
lcdDrawUpdate = 1;
|
||||
encoderPosition += encoderDiff / ENCODER_PULSES_PER_STEP;
|
||||
encoderPosition += (encoderDiff * encoderMultiplier) / ENCODER_PULSES_PER_STEP;
|
||||
encoderDiff = 0;
|
||||
timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||
}
|
||||
@ -1372,7 +1502,7 @@ void lcd_ignore_click(bool b)
|
||||
}
|
||||
|
||||
void lcd_finishstatus() {
|
||||
int len = strlen(lcd_status_message);
|
||||
int len = lcd_strlen(lcd_status_message);
|
||||
if (len > 0) {
|
||||
while (len < LCD_WIDTH) {
|
||||
lcd_status_message[len++] = ' ';
|
||||
@ -1785,24 +1915,4 @@ char *ftostr52(const float &x)
|
||||
return conv;
|
||||
}
|
||||
|
||||
// Callback for after editing PID i value
|
||||
// grab the PID i value out of the temp variable; scale it; then update the PID driver
|
||||
void copy_and_scalePID_i()
|
||||
{
|
||||
#ifdef PIDTEMP
|
||||
PID_PARAM(Ki, pid_current_extruder) = scalePID_i(raw_Ki);
|
||||
updatePID();
|
||||
#endif
|
||||
}
|
||||
|
||||
// Callback for after editing PID d value
|
||||
// grab the PID d value out of the temp variable; scale it; then update the PID driver
|
||||
void copy_and_scalePID_d()
|
||||
{
|
||||
#ifdef PIDTEMP
|
||||
PID_PARAM(Kd, pid_current_extruder) = scalePID_d(raw_Kd);
|
||||
updatePID();
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif //ULTRA_LCD
|
||||
|
@ -4,7 +4,8 @@
|
||||
#include "Marlin.h"
|
||||
|
||||
#ifdef ULTRA_LCD
|
||||
|
||||
int lcd_strlen(char *s);
|
||||
int lcd_strlen_P(const char *s);
|
||||
void lcd_update();
|
||||
void lcd_init();
|
||||
void lcd_setstatus(const char* message);
|
||||
|
@ -636,7 +636,7 @@ static void lcd_implementation_drawmenu_generic(uint8_t row, const char* pstr, c
|
||||
{
|
||||
lcd.print(c);
|
||||
pstr++;
|
||||
n--;
|
||||
if ((pgm_read_byte(pstr) & 0xc0) != 0x80) n--;
|
||||
}
|
||||
while(n--)
|
||||
lcd.print(' ');
|
||||
@ -648,9 +648,9 @@ static void lcd_implementation_drawmenu_setting_edit_generic(uint8_t row, const
|
||||
char c;
|
||||
//Use all characters in narrow LCDs
|
||||
#if LCD_WIDTH < 20
|
||||
uint8_t n = LCD_WIDTH - 1 - 1 - strlen(data);
|
||||
uint8_t n = LCD_WIDTH - 1 - 1 - lcd_strlen(data);
|
||||
#else
|
||||
uint8_t n = LCD_WIDTH - 1 - 2 - strlen(data);
|
||||
uint8_t n = LCD_WIDTH - 1 - 2 - lcd_strlen(data);
|
||||
#endif
|
||||
lcd.setCursor(0, row);
|
||||
lcd.print(pre_char);
|
||||
@ -658,7 +658,7 @@ static void lcd_implementation_drawmenu_setting_edit_generic(uint8_t row, const
|
||||
{
|
||||
lcd.print(c);
|
||||
pstr++;
|
||||
n--;
|
||||
if ((pgm_read_byte(pstr) & 0xc0) != 0x80) n--;
|
||||
}
|
||||
lcd.print(':');
|
||||
while(n--)
|
||||
@ -670,9 +670,9 @@ static void lcd_implementation_drawmenu_setting_edit_generic_P(uint8_t row, cons
|
||||
char c;
|
||||
//Use all characters in narrow LCDs
|
||||
#if LCD_WIDTH < 20
|
||||
uint8_t n = LCD_WIDTH - 1 - 1 - strlen_P(data);
|
||||
uint8_t n = LCD_WIDTH - 1 - 1 - lcd_strlen_P(data);
|
||||
#else
|
||||
uint8_t n = LCD_WIDTH - 1 - 2 - strlen_P(data);
|
||||
uint8_t n = LCD_WIDTH - 1 - 2 - lcd_strlen_P(data);
|
||||
#endif
|
||||
lcd.setCursor(0, row);
|
||||
lcd.print(pre_char);
|
||||
@ -680,7 +680,7 @@ static void lcd_implementation_drawmenu_setting_edit_generic_P(uint8_t row, cons
|
||||
{
|
||||
lcd.print(c);
|
||||
pstr++;
|
||||
n--;
|
||||
if ((pgm_read_byte(pstr) & 0xc0) != 0x80) n--;
|
||||
}
|
||||
lcd.print(':');
|
||||
while(n--)
|
||||
@ -733,9 +733,9 @@ void lcd_implementation_drawedit(const char* pstr, char* value)
|
||||
lcd_printPGM(pstr);
|
||||
lcd.print(':');
|
||||
#if LCD_WIDTH < 20
|
||||
lcd.setCursor(LCD_WIDTH - strlen(value), 1);
|
||||
lcd.setCursor(LCD_WIDTH - lcd_strlen(value), 1);
|
||||
#else
|
||||
lcd.setCursor(LCD_WIDTH -1 - strlen(value), 1);
|
||||
lcd.setCursor(LCD_WIDTH -1 - lcd_strlen(value), 1);
|
||||
#endif
|
||||
lcd.print(value);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user