Removed unused files (ST7565R-dogm, digipot)
renamed functions digipot_init and digipot_current fixed cond. trans. (menus) fixed variant files - MK25, MK3
This commit is contained in:
parent
dba2fd7e75
commit
baade7db61
16 changed files with 57 additions and 1411 deletions
|
@ -616,7 +616,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
|
|||
|
||||
//LCD and SD support
|
||||
#define ULTRA_LCD //general LCD support, also 16x2
|
||||
//#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
|
||||
#define SDSUPPORT // Enable SD Card Support in Hardware Console
|
||||
//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
|
||||
#define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication
|
||||
|
@ -639,12 +638,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
|
|||
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
|
||||
//#define G3D_PANEL
|
||||
|
||||
// The RepRapDiscount FULL GRAPHIC Smart Controller (quadratic white PCB)
|
||||
// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
|
||||
//
|
||||
// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
|
||||
//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
|
||||
|
||||
// The RepRapWorld REPRAPWORLD_KEYPAD v1.1
|
||||
// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
|
||||
//#define REPRAPWORLD_KEYPAD
|
||||
|
@ -657,19 +650,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
|
|||
|
||||
//automatic expansion
|
||||
#if defined (MAKRPANEL)
|
||||
#define DOGLCD
|
||||
#define SDSUPPORT
|
||||
#define ULTIPANEL
|
||||
#define NEWPANEL
|
||||
#define DEFAULT_LCD_CONTRAST 17
|
||||
#endif
|
||||
|
||||
#if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
|
||||
#define DOGLCD
|
||||
#define U8GLIB_ST7920
|
||||
#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
||||
#endif
|
||||
|
||||
#if defined(ULTIMAKERCONTROLLER) || defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
|
||||
#define ULTIPANEL
|
||||
#define NEWPANEL
|
||||
|
@ -778,12 +764,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
|
|||
#endif
|
||||
#endif
|
||||
|
||||
// default LCD contrast for dogm-like LCD displays
|
||||
#ifdef DOGLCD
|
||||
# ifndef DEFAULT_LCD_CONTRAST
|
||||
# define DEFAULT_LCD_CONTRAST 32
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
|
||||
//#define FAST_PWM_FAN
|
||||
|
|
|
@ -199,14 +199,6 @@
|
|||
#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
|
||||
|
||||
|
||||
|
||||
// uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
|
||||
//#define DIGIPOT_I2C
|
||||
// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
|
||||
#define DIGIPOT_I2C_NUM_CHANNELS 8
|
||||
// actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
|
||||
#define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0}
|
||||
|
||||
//===========================================================================
|
||||
//=============================Additional Features===========================
|
||||
//===========================================================================
|
||||
|
|
|
@ -136,7 +136,6 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
|
|||
#define MINTEMP_MINAMBIENT 25
|
||||
#define MINTEMP_MINAMBIENT_RAW 978
|
||||
|
||||
#define DEBUG_DISABLE_FORCE_SELFTEST //disable force selftest
|
||||
//#define DEBUG_BUILD
|
||||
#ifdef DEBUG_BUILD
|
||||
//#define _NO_ASM
|
||||
|
@ -158,7 +157,7 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
|
|||
//#define DEBUG_DISABLE_LCD_STATUS_LINE //empty four lcd line
|
||||
//#define DEBUG_DISABLE_PREVENT_EXTRUDER //cold extrusion and long extrusion allowed
|
||||
//#define DEBUG_DISABLE_PRUSA_STATISTICS //disable prusa_statistics() mesages
|
||||
#define DEBUG_DISABLE_FORCE_SELFTEST //disable force selftest
|
||||
//#define DEBUG_DISABLE_FORCE_SELFTEST //disable force selftest
|
||||
//#define DEBUG_XSTEP_DUP_PIN 21 //duplicate x-step output to pin 21 (SCL on P3)
|
||||
//#define DEBUG_YSTEP_DUP_PIN 21 //duplicate y-step output to pin 21 (SCL on P3)
|
||||
//#define DEBUG_BLINK_ACTIVE
|
||||
|
@ -170,7 +169,7 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
|
|||
#endif /* DEBUG_BUILD */
|
||||
|
||||
//#define EXPERIMENTAL_FEATURES
|
||||
#define TMC2130_LINEARITY_CORRECTION
|
||||
//#define TMC2130_LINEARITY_CORRECTION
|
||||
//#define TMC2130_VARIABLE_RESOLUTION
|
||||
|
||||
|
||||
|
@ -577,6 +576,7 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
|
|||
#define PING_TIME 60 //time in s
|
||||
#define PING_TIME_LONG 600 //10 min; used when length of commands buffer > 0 to avoid false triggering when dealing with long gcodes
|
||||
#define PING_ALLERT_PERIOD 60 //time in s
|
||||
|
||||
#define NC_TIME 10 //time in s for periodic important status messages sending which needs reponse from monitoring
|
||||
#define NC_BUTTON_LONG_PRESS 15 //time in s
|
||||
|
||||
|
|
|
@ -1,225 +0,0 @@
|
|||
#define START_BMPWIDTH 60 //Width in pixels - http://www.digole.com/tools/PicturetoC_Hex_converter.php
|
||||
#define START_BMPHEIGHT 64 //Height in pixels
|
||||
#define START_BMPBYTEWIDTH 8 //Width in bytes
|
||||
const unsigned char start_bmp[574] PROGMEM = { //AVR-GCC, WinAVR
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x0f,0xff,0xff,0xff,0xff,0xff,0xff,0xef,
|
||||
0x30,0x00,0x00,0x00,0x00,0x00,0x7f,0xff,
|
||||
0x60,0x00,0x00,0x00,0x00,0x00,0x1f,0xff,
|
||||
0x40,0x00,0x00,0x00,0x00,0x00,0x0f,0xff,
|
||||
0x40,0x00,0x00,0x00,0x01,0x80,0x0f,0xff,
|
||||
0x83,0xef,0xc0,0x00,0x01,0x8c,0x07,0xff,
|
||||
0x87,0xff,0xe0,0x00,0x01,0x8c,0x03,0xff,
|
||||
0x86,0x38,0x60,0x00,0x01,0x80,0x01,0xff,
|
||||
0x86,0x18,0x63,0xe0,0xf9,0x8c,0x7c,0xff,
|
||||
0x86,0x18,0x67,0xf1,0xfd,0x8c,0xfe,0x7f,
|
||||
0x86,0x18,0x6e,0x31,0x8d,0x8c,0xc6,0x3f,
|
||||
0x86,0x18,0x6c,0x39,0x8d,0x8c,0xc7,0x1f,
|
||||
0x86,0x18,0x6c,0x19,0x81,0x8c,0xc7,0x1f,
|
||||
0x86,0x18,0x6c,0x19,0x81,0x8c,0xc7,0x1f,
|
||||
0x86,0x18,0x6f,0x9f,0x81,0xcd,0xc7,0x1f,
|
||||
0x06,0x18,0x67,0xdf,0x80,0xef,0xc7,0x1f,
|
||||
0x44,0x18,0x61,0x9f,0x00,0x2f,0xc2,0x2f,
|
||||
0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x2f,
|
||||
0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x4f,
|
||||
0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0x8f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f
|
||||
};
|
||||
|
||||
// Here comes a compile-time operation to match the extruder symbols
|
||||
// on the info screen to the set number of extruders in configuration.h
|
||||
//
|
||||
// When only one extruder is selected, the "1" on the symbol will not
|
||||
// be displayed.
|
||||
|
||||
#if EXTRUDERS == 1
|
||||
#define STATUS_SCREENWIDTH 115 //Width in pixels
|
||||
#define STATUS_SCREENHEIGHT 19 //Height in pixels
|
||||
#define STATUS_SCREENBYTEWIDTH 15 //Width in bytes
|
||||
const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xE0,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x63,0x0C,0x60,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x47,0x0E,0x20,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4F,0x0F,0x20,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5F,0x0F,0xA0,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5E,0x07,0xA0,
|
||||
0x7F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41,0x04,0x00,0x40,0x60,0x20,
|
||||
0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x82,0x00,0x40,0xF0,0x20,
|
||||
0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x82,0x00,0x40,0xF0,0x20,
|
||||
0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41,0x04,0x00,0x40,0x60,0x20,
|
||||
0x7F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x82,0x08,0x00,0x5E,0x07,0xA0,
|
||||
0x7F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x04,0x10,0x00,0x5F,0x0F,0xA0,
|
||||
0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x04,0x10,0x00,0x4F,0x0F,0x20,
|
||||
0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x82,0x08,0x00,0x47,0x0E,0x20,
|
||||
0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41,0x04,0x00,0x63,0x0C,0x60,
|
||||
0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
|
||||
0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0x80,0x7F,0xFF,0xE0,
|
||||
0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0x80,0x00,0x00,0x00
|
||||
};
|
||||
|
||||
#define STATUS_SCREENWIDTH 115 //Width in pixels
|
||||
#define STATUS_SCREENHEIGHT 19 //Height in pixels
|
||||
#define STATUS_SCREENBYTEWIDTH 15 //Width in bytes
|
||||
const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xE0,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x61,0xF8,0x60,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41,0xF8,0x20,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xF0,0x20,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x60,0x20,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x58,0x01,0xA0,
|
||||
0x7F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41,0x04,0x00,0x5C,0x63,0xA0,
|
||||
0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x82,0x00,0x5E,0xF7,0xA0,
|
||||
0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x82,0x00,0x5E,0xF7,0xA0,
|
||||
0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41,0x04,0x00,0x5C,0x63,0xA0,
|
||||
0x7F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x82,0x08,0x00,0x58,0x01,0xA0,
|
||||
0x7F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x04,0x10,0x00,0x40,0x60,0x20,
|
||||
0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x04,0x10,0x00,0x40,0xF0,0x20,
|
||||
0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x82,0x08,0x00,0x41,0xF8,0x20,
|
||||
0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41,0x04,0x00,0x61,0xF8,0x60,
|
||||
0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
|
||||
0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0x80,0x7F,0xFF,0xE0,
|
||||
0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0x80,0x00,0x00,0x00
|
||||
};
|
||||
#elif EXTRUDERS == 2
|
||||
#define STATUS_SCREENWIDTH 115 //Width in pixels
|
||||
#define STATUS_SCREENHEIGHT 19 //Height in pixels
|
||||
#define STATUS_SCREENBYTEWIDTH 15 //Width in bytes
|
||||
const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xE0,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x63,0x0C,0x60,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x47,0x0E,0x20,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4F,0x0F,0x20,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5F,0x0F,0xA0,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5E,0x07,0xA0,
|
||||
0x7F,0x80,0x00,0x3F,0xC0,0x00,0x00,0x00,0x00,0x41,0x04,0x00,0x40,0x60,0x20,
|
||||
0xFB,0xC0,0x00,0x79,0xE0,0x00,0x00,0x00,0x00,0x20,0x82,0x00,0x40,0xF0,0x20,
|
||||
0xF3,0xC0,0x00,0x76,0xE0,0x00,0x00,0x00,0x00,0x20,0x82,0x00,0x40,0xF0,0x20,
|
||||
0xEB,0xC0,0x00,0x7E,0xE0,0x00,0x00,0x00,0x00,0x41,0x04,0x00,0x40,0x60,0x20,
|
||||
0x7B,0x80,0x00,0x3D,0xC0,0x00,0x00,0x00,0x00,0x82,0x08,0x00,0x5E,0x07,0xA0,
|
||||
0x7B,0x80,0x00,0x3B,0xC0,0x00,0x00,0x00,0x01,0x04,0x10,0x00,0x5F,0x0F,0xA0,
|
||||
0xFB,0xC0,0x00,0x77,0xE0,0x00,0x00,0x00,0x01,0x04,0x10,0x00,0x4F,0x0F,0x20,
|
||||
0xFB,0xC0,0x00,0x70,0xE0,0x00,0x00,0x00,0x00,0x82,0x08,0x00,0x47,0x0E,0x20,
|
||||
0xFF,0xC0,0x00,0x7F,0xE0,0x00,0x00,0x00,0x00,0x41,0x04,0x00,0x63,0x0C,0x60,
|
||||
0x3F,0x00,0x00,0x1F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
|
||||
0x1E,0x00,0x00,0x0F,0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0x80,0x7F,0xFF,0xE0,
|
||||
0x0C,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0x80,0x00,0x00,0x00
|
||||
};
|
||||
|
||||
#define STATUS_SCREENWIDTH 115 //Width in pixels
|
||||
#define STATUS_SCREENHEIGHT 19 //Height in pixels
|
||||
#define STATUS_SCREENBYTEWIDTH 15 //Width in bytes
|
||||
const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xE0,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x61,0xF8,0x60,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41,0xF8,0x20,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xF0,0x20,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x60,0x20,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x58,0x01,0xA0,
|
||||
0x7F,0x80,0x00,0x3F,0xC0,0x00,0x00,0x00,0x00,0x41,0x04,0x00,0x5C,0x63,0xA0,
|
||||
0xFB,0xC0,0x00,0x79,0xE0,0x00,0x00,0x00,0x00,0x20,0x82,0x00,0x5E,0xF7,0xA0,
|
||||
0xF3,0xC0,0x00,0x76,0xE0,0x00,0x00,0x00,0x00,0x20,0x82,0x00,0x5E,0xF7,0xA0,
|
||||
0xEB,0xC0,0x00,0x7E,0xE0,0x00,0x00,0x00,0x00,0x41,0x04,0x00,0x5C,0x63,0xA0,
|
||||
0x7B,0x80,0x00,0x3D,0xC0,0x00,0x00,0x00,0x00,0x82,0x08,0x00,0x58,0x01,0xA0,
|
||||
0x7B,0x80,0x00,0x3B,0xC0,0x00,0x00,0x00,0x01,0x04,0x10,0x00,0x40,0x60,0x20,
|
||||
0xFB,0xC0,0x00,0x77,0xE0,0x00,0x00,0x00,0x01,0x04,0x10,0x00,0x40,0xF0,0x20,
|
||||
0xFB,0xC0,0x00,0x70,0xE0,0x00,0x00,0x00,0x00,0x82,0x08,0x00,0x41,0xF8,0x20,
|
||||
0xFF,0xC0,0x00,0x7F,0xE0,0x00,0x00,0x00,0x00,0x41,0x04,0x00,0x61,0xF8,0x60,
|
||||
0x3F,0x00,0x00,0x1F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
|
||||
0x1E,0x00,0x00,0x0F,0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0x80,0x7F,0xFF,0xE0,
|
||||
0x0C,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0x80,0x00,0x00,0x00
|
||||
};
|
||||
#else
|
||||
#define STATUS_SCREENWIDTH 115 //Width in pixels
|
||||
#define STATUS_SCREENHEIGHT 19 //Height in pixels
|
||||
#define STATUS_SCREENBYTEWIDTH 15 //Width in bytes
|
||||
const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xE0,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x63,0x0C,0x60,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x47,0x0E,0x20,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4F,0x0F,0x20,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5F,0x0F,0xA0,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5E,0x07,0xA0,
|
||||
0x7F,0x80,0x00,0x3F,0xC0,0x00,0x3F,0xC0,0x00,0x41,0x04,0x00,0x40,0x60,0x20,
|
||||
0xFB,0xC0,0x00,0x79,0xE0,0x00,0x79,0xE0,0x00,0x20,0x82,0x00,0x40,0xF0,0x20,
|
||||
0xF3,0xC0,0x00,0x76,0xE0,0x00,0x76,0xE0,0x00,0x20,0x82,0x00,0x40,0xF0,0x20,
|
||||
0xEB,0xC0,0x00,0x7E,0xE0,0x00,0x7E,0xE0,0x00,0x41,0x04,0x00,0x40,0x60,0x20,
|
||||
0x7B,0x80,0x00,0x3D,0xC0,0x00,0x39,0xC0,0x00,0x82,0x08,0x00,0x5E,0x07,0xA0,
|
||||
0x7B,0x80,0x00,0x3B,0xC0,0x00,0x3E,0xC0,0x01,0x04,0x10,0x00,0x5F,0x0F,0xA0,
|
||||
0xFB,0xC0,0x00,0x77,0xE0,0x00,0x76,0xE0,0x01,0x04,0x10,0x00,0x4F,0x0F,0x20,
|
||||
0xFB,0xC0,0x00,0x70,0xE0,0x00,0x79,0xE0,0x00,0x82,0x08,0x00,0x47,0x0E,0x20,
|
||||
0xFF,0xC0,0x00,0x7F,0xE0,0x00,0x7F,0xE0,0x00,0x41,0x04,0x00,0x63,0x0C,0x60,
|
||||
0x3F,0x00,0x00,0x1F,0x80,0x00,0x1F,0x80,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
|
||||
0x1E,0x00,0x00,0x0F,0x00,0x00,0x0F,0x00,0x01,0xFF,0xFF,0x80,0x7F,0xFF,0xE0,
|
||||
0x0C,0x00,0x00,0x06,0x00,0x00,0x06,0x00,0x01,0xFF,0xFF,0x80,0x00,0x00,0x00
|
||||
};
|
||||
|
||||
#define STATUS_SCREENWIDTH 115 //Width in pixels
|
||||
#define STATUS_SCREENHEIGHT 19 //Height in pixels
|
||||
#define STATUS_SCREENBYTEWIDTH 15 //Width in bytes
|
||||
const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xE0,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x61,0xF8,0x60,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41,0xF8,0x20,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xF0,0x20,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x60,0x20,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x58,0x01,0xA0,
|
||||
0x7F,0x80,0x00,0x3F,0xC0,0x00,0x3F,0xC0,0x00,0x41,0x04,0x00,0x5C,0x63,0xA0,
|
||||
0xFB,0xC0,0x00,0x79,0xE0,0x00,0x79,0xE0,0x00,0x20,0x82,0x00,0x5E,0xF7,0xA0,
|
||||
0xF3,0xC0,0x00,0x76,0xE0,0x00,0x76,0xE0,0x00,0x20,0x82,0x00,0x5E,0xF7,0xA0,
|
||||
0xEB,0xC0,0x00,0x7E,0xE0,0x00,0x7E,0xE0,0x00,0x41,0x04,0x00,0x5C,0x63,0xA0,
|
||||
0x7B,0x80,0x00,0x3D,0xC0,0x00,0x39,0xC0,0x00,0x82,0x08,0x00,0x58,0x01,0xA0,
|
||||
0x7B,0x80,0x00,0x3B,0xC0,0x00,0x3E,0xC0,0x01,0x04,0x10,0x00,0x40,0x60,0x20,
|
||||
0xFB,0xC0,0x00,0x77,0xE0,0x00,0x76,0xE0,0x01,0x04,0x10,0x00,0x40,0xF0,0x20,
|
||||
0xFB,0xC0,0x00,0x70,0xE0,0x00,0x79,0xE0,0x00,0x82,0x08,0x00,0x41,0xF8,0x20,
|
||||
0xFF,0xC0,0x00,0x7F,0xE0,0x00,0x7F,0xE0,0x00,0x41,0x04,0x00,0x61,0xF8,0x60,
|
||||
0x3F,0x00,0x00,0x1F,0x80,0x00,0x1F,0x80,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
|
||||
0x1E,0x00,0x00,0x0F,0x00,0x00,0x0F,0x00,0x01,0xFF,0xFF,0x80,0x7F,0xFF,0xE0,
|
||||
0x0C,0x00,0x00,0x06,0x00,0x00,0x06,0x00,0x01,0xFF,0xFF,0x80,0x00,0x00,0x00
|
||||
};
|
||||
#endif // Extruders
|
||||
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
{
|
||||
"build_systems":
|
||||
[
|
||||
{
|
||||
"name": "compile",
|
||||
"working_dir": "$project_path",
|
||||
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
|
||||
// Arduino build process:
|
||||
// https://www.arduino.cc/en/Hacking/BuildProcess
|
||||
"shell_cmd": "\"c:\\Program Files (x86)\\Arduino\\arduino_debug.exe\" --pref build.path=..\\output --verify --board marlinAddon:avr:rambo -v --preserve-temp-files Firmware.ino"
|
||||
},
|
||||
{
|
||||
"name": "compile & upload",
|
||||
"working_dir": "$project_path",
|
||||
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
|
||||
//FIXME
|
||||
// Better to use avrdude directly?
|
||||
// http://www.nongnu.org/avrdude/user-manual/avrdude_4.html
|
||||
// avrdude -F -v -pm168 -cstk500v1 -P\\.\COM4 -b19200 -D -Uflash:w:"file.hex":i
|
||||
// may need add path to avrdude config file: -C"c:\utils\arduino-0016\hardware\tools\avr\etc\avrdude.conf" if Arduino IDE installed in "c:\utils\arduino-0016\"
|
||||
// https://typeunsafe.wordpress.com/2011/07/22/programming-arduino-with-avrdude/
|
||||
"shell_cmd": "\"c:\\Program Files (x86)\\Arduino\\arduino_debug.exe\" --pref build.path=..\\output --upload --port COM9 --board marlinAddon:avr:rambo -v --preserve-temp-files Firmware.ino"
|
||||
},
|
||||
{
|
||||
"name": "map-data",
|
||||
"working_dir": "$project_path",
|
||||
// https://sourceware.org/binutils/docs-2.21/binutils/objdump.html
|
||||
// Maybe it is better to generate map files by the linker?
|
||||
// avr-gcc -g -mmcu=atmega8 -Wl,-Map,demo.map -o demo.elf demo.o
|
||||
"shell_cmd": "\"c:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr\\bin\\avr-objdump.exe\" -x -S -C -j .data ..\\output\\Firmware.ino.elf > ..\\output\\Firmware-data.map"
|
||||
},
|
||||
{
|
||||
"name": "map-bss",
|
||||
"working_dir": "$project_path",
|
||||
// https://sourceware.org/binutils/docs-2.21/binutils/objdump.html
|
||||
"shell_cmd": "\"c:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr\\bin\\avr-objdump.exe\" -x -S -C -j .bss ..\\output\\Firmware.ino.elf > ..\\output\\Firmware-bss.map"
|
||||
},
|
||||
{
|
||||
"name": "map-all",
|
||||
"working_dir": "$project_path",
|
||||
// https://sourceware.org/binutils/docs-2.21/binutils/objdump.html
|
||||
"shell_cmd": "\"c:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr\\bin\\avr-objdump.exe\" -x -S -C ..\\output\\Firmware.ino.elf > ..\\output\\Firmware-all.map"
|
||||
},
|
||||
{
|
||||
"name": "disassemble",
|
||||
"working_dir": "$project_path",
|
||||
// https://sourceware.org/binutils/docs-2.21/binutils/objdump.html
|
||||
"shell_cmd": "\"c:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr\\bin\\avr-objdump.exe\" -h -w -S ..\\output\\Firmware.ino.elf > ..\\output\\Firmware.asm"
|
||||
}
|
||||
],
|
||||
"folders":
|
||||
[
|
||||
{
|
||||
"path": "."
|
||||
// "folder_exclude_patterns": [".svn", "._d", ".metadata", ".settings"],
|
||||
// "file_exclude_patterns": ["XS.c"]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -328,10 +328,6 @@ extern int fan_speed[2];
|
|||
// Handling multiple extruders pins
|
||||
extern uint8_t active_extruder;
|
||||
|
||||
#ifdef DIGIPOT_I2C
|
||||
extern void digipot_i2c_set_current( int channel, float current );
|
||||
extern void digipot_i2c_init();
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1138,9 +1138,6 @@ void setup()
|
|||
#endif
|
||||
|
||||
|
||||
#ifdef DIGIPOT_I2C
|
||||
digipot_i2c_init();
|
||||
#endif
|
||||
setup_homepin();
|
||||
|
||||
#ifdef TMC2130
|
||||
|
@ -2249,7 +2246,6 @@ void force_high_power_mode(bool start_high_power_section) {
|
|||
// Be safe than sorry, reset the stepper timer before re-enabling interrupts.
|
||||
st_reset_timer();
|
||||
sei();
|
||||
digipot_init();
|
||||
}
|
||||
}
|
||||
#endif //TMC2130
|
||||
|
@ -5948,7 +5944,7 @@ Sigma_Exit:
|
|||
tmc2130_set_current_r(E_AXIS, TMC2130_UNLOAD_CURRENT_R);
|
||||
#else
|
||||
|
||||
digipot_current(2, 200); //set lower E motor current for unload to protect filament sensor and ptfe tube
|
||||
st_current_set(2, 200); //set lower E motor current for unload to protect filament sensor and ptfe tube
|
||||
float tmp_motor[3] = DEFAULT_PWM_MOTOR_CURRENT;
|
||||
float tmp_motor_loud[3] = DEFAULT_PWM_MOTOR_CURRENT_LOUD;
|
||||
|
||||
|
@ -5968,8 +5964,8 @@ Sigma_Exit:
|
|||
tmc2130_set_current_r(E_AXIS, tmc2130_current_r_bckp);
|
||||
#else
|
||||
uint8_t silentMode = eeprom_read_byte((uint8_t*)EEPROM_SILENT);
|
||||
if(silentMode) digipot_current(2, tmp_motor[2]); //set E back to normal operation currents
|
||||
else digipot_current(2, tmp_motor_loud[2]);
|
||||
if(silentMode) st_current_set(2, tmp_motor[2]); //set E back to normal operation currents
|
||||
else st_current_set(2, tmp_motor_loud[2]);
|
||||
#endif //TMC2130
|
||||
|
||||
#endif // SNMM
|
||||
|
@ -6216,24 +6212,18 @@ Sigma_Exit:
|
|||
case 907: // M907 Set digital trimpot motor current using axis codes.
|
||||
{
|
||||
#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
|
||||
for(int i=0;i<NUM_AXIS;i++) if(code_seen(axis_codes[i])) digipot_current(i,code_value());
|
||||
if(code_seen('B')) digipot_current(4,code_value());
|
||||
if(code_seen('S')) for(int i=0;i<=4;i++) digipot_current(i,code_value());
|
||||
for(int i=0;i<NUM_AXIS;i++) if(code_seen(axis_codes[i])) st_current_set(i,code_value());
|
||||
if(code_seen('B')) st_current_set(4,code_value());
|
||||
if(code_seen('S')) for(int i=0;i<=4;i++) st_current_set(i,code_value());
|
||||
#endif
|
||||
#ifdef MOTOR_CURRENT_PWM_XY_PIN
|
||||
if(code_seen('X')) digipot_current(0, code_value());
|
||||
if(code_seen('X')) st_current_set(0, code_value());
|
||||
#endif
|
||||
#ifdef MOTOR_CURRENT_PWM_Z_PIN
|
||||
if(code_seen('Z')) digipot_current(1, code_value());
|
||||
if(code_seen('Z')) st_current_set(1, code_value());
|
||||
#endif
|
||||
#ifdef MOTOR_CURRENT_PWM_E_PIN
|
||||
if(code_seen('E')) digipot_current(2, code_value());
|
||||
#endif
|
||||
#ifdef DIGIPOT_I2C
|
||||
// this one uses actual amps in floating point
|
||||
for(int i=0;i<NUM_AXIS;i++) if(code_seen(axis_codes[i])) digipot_i2c_set_current(i, code_value());
|
||||
// for each additional extruder (named B,C,D,E..., channels 4,5,6,7...)
|
||||
for(int i=NUM_AXIS;i<DIGIPOT_I2C_NUM_CHANNELS;i++) if(code_seen('B'+i-NUM_AXIS)) digipot_i2c_set_current(i, code_value());
|
||||
if(code_seen('E')) st_current_set(2, code_value());
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
|
@ -6669,7 +6659,7 @@ void update_currents() {
|
|||
if (destination[Z_AXIS] < Z_SILENT) {
|
||||
//SERIAL_ECHOLNPGM("LOW");
|
||||
for (uint8_t i = 0; i < 3; i++) {
|
||||
digipot_current(i, current_low[i]);
|
||||
st_current_set(i, current_low[i]);
|
||||
/*MYSERIAL.print(int(i));
|
||||
SERIAL_ECHOPGM(": ");
|
||||
MYSERIAL.println(current_low[i]);*/
|
||||
|
@ -6678,7 +6668,7 @@ void update_currents() {
|
|||
else if (destination[Z_AXIS] > Z_HIGH_POWER) {
|
||||
//SERIAL_ECHOLNPGM("HIGH");
|
||||
for (uint8_t i = 0; i < 3; i++) {
|
||||
digipot_current(i, current_high[i]);
|
||||
st_current_set(i, current_high[i]);
|
||||
/*MYSERIAL.print(int(i));
|
||||
SERIAL_ECHOPGM(": ");
|
||||
MYSERIAL.println(current_high[i]);*/
|
||||
|
@ -6688,7 +6678,7 @@ void update_currents() {
|
|||
for (uint8_t i = 0; i < 3; i++) {
|
||||
float q = current_low[i] - Z_SILENT*((current_high[i] - current_low[i]) / (Z_HIGH_POWER - Z_SILENT));
|
||||
tmp_motor[i] = ((current_high[i] - current_low[i]) / (Z_HIGH_POWER - Z_SILENT))*destination[Z_AXIS] + q;
|
||||
digipot_current(i, tmp_motor[i]);
|
||||
st_current_set(i, tmp_motor[i]);
|
||||
/*MYSERIAL.print(int(i));
|
||||
SERIAL_ECHOPGM(": ");
|
||||
MYSERIAL.println(tmp_motor[i]);*/
|
||||
|
@ -8446,7 +8436,7 @@ void extr_unload2() { //unloads filament
|
|||
|
||||
current_position[E_AXIS] += 10; //extrusion
|
||||
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 10, active_extruder);
|
||||
// digipot_current(2, E_MOTOR_HIGH_CURRENT);
|
||||
// st_current_set(2, E_MOTOR_HIGH_CURRENT);
|
||||
if (current_temperature[0] < 230) { //PLA & all other filaments
|
||||
current_position[E_AXIS] += 5.4;
|
||||
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 2800 / 60, active_extruder);
|
||||
|
@ -8475,9 +8465,9 @@ void extr_unload2() { //unloads filament
|
|||
current_position[E_AXIS] -= (bowden_length[snmm_extruder] + 60 + FIL_LOAD_LENGTH) / 2;
|
||||
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 500, active_extruder);
|
||||
st_synchronize();
|
||||
//digipot_init();
|
||||
// if (SilentMode == 1) digipot_current(2, tmp_motor[2]); //set back to normal operation currents
|
||||
// else digipot_current(2, tmp_motor_loud[2]);
|
||||
//st_current_init();
|
||||
// if (SilentMode == 1) st_current_set(2, tmp_motor[2]); //set back to normal operation currents
|
||||
// else st_current_set(2, tmp_motor_loud[2]);
|
||||
lcd_update_enable(true);
|
||||
// lcd_return_to_status();
|
||||
max_feedrate[E_AXIS] = 50;
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
#include "Configuration.h"
|
||||
|
||||
#ifdef DIGIPOT_I2C
|
||||
#include "Stream.h"
|
||||
#include "utility/twi.h"
|
||||
#include "Wire.h"
|
||||
|
||||
// Settings for the I2C based DIGIPOT (MCP4451) on Azteeg X3 Pro
|
||||
#if MB(5DPRINT)
|
||||
#define DIGIPOT_I2C_FACTOR 117.96
|
||||
#define DIGIPOT_I2C_MAX_CURRENT 1.736
|
||||
#else
|
||||
#define DIGIPOT_I2C_FACTOR 106.7
|
||||
#define DIGIPOT_I2C_MAX_CURRENT 2.5
|
||||
#endif
|
||||
|
||||
static byte current_to_wiper( float current ){
|
||||
return byte(ceil(float((DIGIPOT_I2C_FACTOR*current))));
|
||||
}
|
||||
|
||||
static void i2c_send(byte addr, byte a, byte b)
|
||||
{
|
||||
Wire.beginTransmission(addr);
|
||||
Wire.write(a);
|
||||
Wire.write(b);
|
||||
Wire.endTransmission();
|
||||
}
|
||||
|
||||
// This is for the MCP4451 I2C based digipot
|
||||
void digipot_i2c_set_current( int channel, float current )
|
||||
{
|
||||
current = min( (float) max( current, 0.0f ), DIGIPOT_I2C_MAX_CURRENT);
|
||||
// these addresses are specific to Azteeg X3 Pro, can be set to others,
|
||||
// In this case first digipot is at address A0=0, A1= 0, second one is at A0=0, A1= 1
|
||||
byte addr= 0x2C; // channel 0-3
|
||||
if(channel >= 4) {
|
||||
addr= 0x2E; // channel 4-7
|
||||
channel-= 4;
|
||||
}
|
||||
|
||||
// Initial setup
|
||||
i2c_send( addr, 0x40, 0xff );
|
||||
i2c_send( addr, 0xA0, 0xff );
|
||||
|
||||
// Set actual wiper value
|
||||
byte addresses[4] = { 0x00, 0x10, 0x60, 0x70 };
|
||||
i2c_send( addr, addresses[channel], current_to_wiper(current) );
|
||||
}
|
||||
|
||||
void digipot_i2c_init()
|
||||
{
|
||||
const float digipot_motor_current[] = DIGIPOT_I2C_MOTOR_CURRENTS;
|
||||
Wire.begin();
|
||||
// setup initial currents as defined in Configuration_adv.h
|
||||
for(int i=0;i<=sizeof(digipot_motor_current)/sizeof(float);i++) {
|
||||
digipot_i2c_set_current(i, digipot_motor_current[i]);
|
||||
}
|
||||
}
|
||||
#endif
|
|
@ -1,337 +0,0 @@
|
|||
/*
|
||||
Fontname: -Misc-Fixed-Medium-R-Normal--9-90-75-75-C-60-ISO10646-1
|
||||
Copyright: Public domain font. Share and enjoy.
|
||||
Capital A Height: 6, '1' Height: 6
|
||||
Calculated Max Values w= 6 h= 9 x= 2 y= 7 dx= 6 dy= 0 ascent= 7 len= 9
|
||||
Font Bounding box w= 6 h= 9 x= 0 y=-2
|
||||
Calculated Min Values x= 0 y=-2 dx= 0 dy= 0
|
||||
Pure Font ascent = 6 descent=-2
|
||||
X Font ascent = 6 descent=-2
|
||||
Max Font ascent = 7 descent=-2
|
||||
*/
|
||||
#include <utility/u8g.h>
|
||||
const u8g_fntpgm_uint8_t u8g_font_6x9[2300] U8G_SECTION(".progmem.u8g_font_6x9") = {
|
||||
0,6,9,0,254,6,1,137,2,254,32,255,254,7,254,6,
|
||||
254,0,0,0,6,0,7,1,6,6,6,2,0,128,128,128,
|
||||
128,0,128,3,3,3,6,1,3,160,160,160,5,7,7,6,
|
||||
0,255,80,80,248,80,248,80,80,5,9,9,6,0,254,32,
|
||||
112,168,160,112,40,168,112,32,6,8,8,6,0,255,64,168,
|
||||
72,16,32,72,84,8,5,7,7,6,0,255,96,144,144,96,
|
||||
152,144,104,1,3,3,6,2,3,128,128,128,2,7,7,6,
|
||||
2,255,64,128,128,128,128,128,64,2,7,7,6,2,255,128,
|
||||
64,64,64,64,64,128,5,5,5,6,0,0,136,80,248,80,
|
||||
136,5,5,5,6,0,0,32,32,248,32,32,2,4,4,6,
|
||||
2,254,192,64,64,128,5,1,1,6,0,2,248,2,2,2,
|
||||
6,2,0,192,192,4,6,6,6,1,0,16,16,32,64,128,
|
||||
128,4,6,6,6,1,0,96,144,144,144,144,96,3,6,6,
|
||||
6,1,0,64,192,64,64,64,224,4,6,6,6,1,0,96,
|
||||
144,16,32,64,240,4,6,6,6,1,0,240,32,96,16,16,
|
||||
224,5,6,6,6,0,0,16,48,80,144,248,16,4,6,6,
|
||||
6,1,0,240,128,224,16,16,224,4,6,6,6,1,0,96,
|
||||
128,224,144,144,96,4,6,6,6,1,0,240,16,16,32,64,
|
||||
64,4,6,6,6,1,0,96,144,96,144,144,96,4,6,6,
|
||||
6,1,0,96,144,144,112,16,96,2,5,5,6,2,0,192,
|
||||
192,0,192,192,2,7,7,6,2,254,192,192,0,192,64,64,
|
||||
128,5,5,5,6,0,0,24,96,128,96,24,5,3,3,6,
|
||||
0,1,248,0,248,5,5,5,6,0,0,192,48,8,48,192,
|
||||
4,7,7,6,1,0,96,144,16,96,64,0,64,5,6,6,
|
||||
6,0,0,112,144,168,176,128,112,5,6,6,6,0,0,32,
|
||||
80,136,248,136,136,5,6,6,6,0,0,240,136,240,136,136,
|
||||
240,4,6,6,6,1,0,96,144,128,128,144,96,4,6,6,
|
||||
6,1,0,224,144,144,144,144,224,4,6,6,6,1,0,240,
|
||||
128,224,128,128,240,4,6,6,6,1,0,240,128,224,128,128,
|
||||
128,4,6,6,6,1,0,96,144,128,176,144,96,4,6,6,
|
||||
6,1,0,144,144,240,144,144,144,3,6,6,6,1,0,224,
|
||||
64,64,64,64,224,5,6,6,6,0,0,56,16,16,16,144,
|
||||
96,4,6,6,6,1,0,144,160,192,160,144,144,4,6,6,
|
||||
6,1,0,128,128,128,128,128,240,5,6,6,6,0,0,136,
|
||||
216,168,168,136,136,4,6,6,6,1,0,144,208,176,144,144,
|
||||
144,5,6,6,6,0,0,112,136,136,136,136,112,4,6,6,
|
||||
6,1,0,224,144,144,224,128,128,4,7,7,6,1,255,96,
|
||||
144,144,208,176,96,16,4,6,6,6,1,0,224,144,144,224,
|
||||
144,144,4,6,6,6,1,0,96,144,64,32,144,96,5,6,
|
||||
6,6,0,0,248,32,32,32,32,32,4,6,6,6,1,0,
|
||||
144,144,144,144,144,96,4,6,6,6,1,0,144,144,144,240,
|
||||
96,96,5,6,6,6,0,0,136,136,168,168,216,136,5,6,
|
||||
6,6,0,0,136,80,32,32,80,136,5,6,6,6,0,0,
|
||||
136,136,80,32,32,32,4,6,6,6,1,0,240,16,32,64,
|
||||
128,240,3,6,6,6,1,0,224,128,128,128,128,224,4,6,
|
||||
6,6,1,0,128,128,64,32,16,16,3,6,6,6,1,0,
|
||||
224,32,32,32,32,224,5,3,3,6,0,3,32,80,136,5,
|
||||
1,1,6,0,254,248,2,2,2,6,2,4,128,64,4,4,
|
||||
4,6,1,0,112,144,144,112,4,6,6,6,1,0,128,128,
|
||||
224,144,144,224,4,4,4,6,1,0,112,128,128,112,4,6,
|
||||
6,6,1,0,16,16,112,144,144,112,4,4,4,6,1,0,
|
||||
96,176,192,112,4,6,6,6,1,0,32,80,64,224,64,64,
|
||||
4,6,6,6,1,254,96,144,144,112,16,96,4,6,6,6,
|
||||
1,0,128,128,224,144,144,144,3,6,6,6,1,0,64,0,
|
||||
192,64,64,224,3,8,8,6,1,254,32,0,96,32,32,32,
|
||||
160,64,4,6,6,6,1,0,128,128,160,192,160,144,3,6,
|
||||
6,6,1,0,192,64,64,64,64,224,5,4,4,6,0,0,
|
||||
208,168,168,136,4,4,4,6,1,0,224,144,144,144,4,4,
|
||||
4,6,1,0,96,144,144,96,4,6,6,6,1,254,224,144,
|
||||
144,224,128,128,4,6,6,6,1,254,112,144,144,112,16,16,
|
||||
4,4,4,6,1,0,160,208,128,128,4,4,4,6,1,0,
|
||||
112,192,48,224,4,6,6,6,1,0,64,64,224,64,80,32,
|
||||
4,4,4,6,1,0,144,144,144,112,4,4,4,6,1,0,
|
||||
144,144,96,96,5,4,4,6,0,0,136,168,168,80,4,4,
|
||||
4,6,1,0,144,96,96,144,4,6,6,6,1,254,144,144,
|
||||
144,112,144,96,4,4,4,6,1,0,240,32,64,240,3,7,
|
||||
7,6,1,0,32,64,64,128,64,64,32,1,7,7,6,2,
|
||||
255,128,128,128,128,128,128,128,3,7,7,6,1,0,128,64,
|
||||
64,32,64,64,128,4,2,2,6,1,3,80,160,255,255,255,
|
||||
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
|
||||
255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,
|
||||
0,6,0,7,1,6,6,6,2,0,128,0,128,128,128,128,
|
||||
4,6,6,6,1,255,32,112,160,160,112,32,5,7,7,6,
|
||||
0,255,48,72,64,240,64,64,248,5,5,5,6,0,0,168,
|
||||
80,136,80,168,5,6,6,6,0,0,136,80,248,32,248,32,
|
||||
1,7,7,6,2,255,128,128,128,0,128,128,128,4,7,7,
|
||||
6,1,255,112,128,96,144,96,16,224,3,1,1,6,1,5,
|
||||
160,6,7,7,6,0,0,120,132,148,164,148,132,120,3,5,
|
||||
5,6,1,1,96,160,96,0,224,5,5,5,6,0,0,40,
|
||||
80,160,80,40,4,3,3,6,1,0,240,16,16,4,1,1,
|
||||
6,1,2,240,6,7,7,6,0,0,120,132,180,164,164,132,
|
||||
120,4,1,1,6,1,5,240,4,3,3,6,1,2,96,144,
|
||||
96,5,7,7,6,0,255,32,32,248,32,32,0,248,3,5,
|
||||
5,6,1,1,64,160,32,64,224,3,5,5,6,1,1,192,
|
||||
32,64,32,192,2,2,2,6,2,4,64,128,4,5,5,6,
|
||||
1,255,144,144,176,208,128,5,6,6,6,0,0,120,232,232,
|
||||
104,40,40,1,1,1,6,2,2,128,2,2,2,6,2,254,
|
||||
64,128,3,5,5,6,1,1,64,192,64,64,224,3,5,5,
|
||||
6,1,1,64,160,64,0,224,5,5,5,6,0,0,160,80,
|
||||
40,80,160,5,8,8,6,0,255,64,192,64,80,112,48,120,
|
||||
16,5,8,8,6,0,255,64,192,64,80,104,8,16,56,5,
|
||||
8,8,6,0,255,192,32,64,48,240,48,120,16,4,7,7,
|
||||
6,1,0,32,0,32,96,128,144,96,5,7,7,6,0,0,
|
||||
64,32,32,80,112,136,136,5,7,7,6,0,0,16,32,32,
|
||||
80,112,136,136,5,7,7,6,0,0,32,80,32,80,112,136,
|
||||
136,5,7,7,6,0,0,40,80,32,80,112,136,136,5,7,
|
||||
7,6,0,0,80,0,32,80,112,136,136,5,7,7,6,0,
|
||||
0,32,80,32,80,112,136,136,5,6,6,6,0,0,120,160,
|
||||
240,160,160,184,4,8,8,6,1,254,96,144,128,128,144,96,
|
||||
32,64,4,7,7,6,1,0,64,32,240,128,224,128,240,4,
|
||||
7,7,6,1,0,32,64,240,128,224,128,240,4,7,7,6,
|
||||
1,0,32,80,240,128,224,128,240,4,7,7,6,1,0,80,
|
||||
0,240,128,224,128,240,3,7,7,6,1,0,128,64,224,64,
|
||||
64,64,224,3,7,7,6,1,0,32,64,224,64,64,64,224,
|
||||
3,7,7,6,1,0,64,160,224,64,64,64,224,3,7,7,
|
||||
6,1,0,160,0,224,64,64,64,224,5,6,6,6,0,0,
|
||||
112,72,232,72,72,112,4,7,7,6,1,0,80,160,144,208,
|
||||
176,144,144,4,7,7,6,1,0,64,32,96,144,144,144,96,
|
||||
4,7,7,6,1,0,32,64,96,144,144,144,96,4,7,7,
|
||||
6,1,0,32,80,96,144,144,144,96,4,7,7,6,1,0,
|
||||
80,160,96,144,144,144,96,4,7,7,6,1,0,80,0,96,
|
||||
144,144,144,96,5,5,5,6,0,0,136,80,32,80,136,4,
|
||||
8,8,6,1,255,16,112,176,176,208,208,224,128,4,7,7,
|
||||
6,1,0,64,32,144,144,144,144,96,4,7,7,6,1,0,
|
||||
32,64,144,144,144,144,96,4,7,7,6,1,0,32,80,144,
|
||||
144,144,144,96,4,7,7,6,1,0,80,0,144,144,144,144,
|
||||
96,5,7,7,6,0,0,16,32,136,80,32,32,32,4,6,
|
||||
6,6,1,0,128,224,144,144,224,128,4,6,6,6,1,0,
|
||||
96,144,160,160,144,160,4,7,7,6,1,0,64,32,0,112,
|
||||
144,144,112,4,7,7,6,1,0,32,64,0,112,144,144,112,
|
||||
4,7,7,6,1,0,32,80,0,112,144,144,112,4,7,7,
|
||||
6,1,0,80,160,0,112,144,144,112,4,6,6,6,1,0,
|
||||
80,0,112,144,144,112,4,7,7,6,1,0,32,80,32,112,
|
||||
144,144,112,5,4,4,6,0,0,112,168,176,120,4,6,6,
|
||||
6,1,254,112,128,128,112,32,64,4,7,7,6,1,0,64,
|
||||
32,0,96,176,192,112,4,7,7,6,1,0,32,64,0,96,
|
||||
176,192,112,4,7,7,6,1,0,32,80,0,96,176,192,112,
|
||||
4,6,6,6,1,0,80,0,96,176,192,112,3,7,7,6,
|
||||
1,0,128,64,0,192,64,64,224,3,7,7,6,1,0,32,
|
||||
64,0,192,64,64,224,3,7,7,6,1,0,64,160,0,192,
|
||||
64,64,224,3,6,6,6,1,0,160,0,192,64,64,224,4,
|
||||
7,7,6,1,0,48,96,16,112,144,144,96,4,7,7,6,
|
||||
1,0,80,160,0,224,144,144,144,4,7,7,6,1,0,64,
|
||||
32,0,96,144,144,96,4,7,7,6,1,0,32,64,0,96,
|
||||
144,144,96,4,7,7,6,1,0,32,80,0,96,144,144,96,
|
||||
4,7,7,6,1,0,80,160,0,96,144,144,96,4,6,6,
|
||||
6,1,0,80,0,96,144,144,96,5,5,5,6,0,0,32,
|
||||
0,248,0,32,4,4,4,6,1,0,112,176,208,224,4,7,
|
||||
7,6,1,0,64,32,0,144,144,144,112,4,7,7,6,1,
|
||||
0,32,64,0,144,144,144,112,4,7,7,6,1,0,32,80,
|
||||
0,144,144,144,112,4,6,6,6,1,0,80,0,144,144,144,
|
||||
112,4,9,9,6,1,254,32,64,0,144,144,144,112,144,96,
|
||||
4,8,8,6,1,254,128,128,224,144,144,224,128,128,4,8,
|
||||
8,6,1,254,80,0,144,144,144,112,144,96};
|
||||
|
||||
// STB Marlin
|
||||
/*
|
||||
Fontname: u8g_font_6x10_marlin
|
||||
Copyright: Public domain terminal emulator font. Share and enjoy.
|
||||
Capital A Height: 7, '1' Height: 7
|
||||
Calculated Max Values w= 6 h=10 x= 2 y= 7 dx= 6 dy= 0 ascent= 8 len=10
|
||||
Font Bounding box w= 6 h= 9 x= 0 y=-2
|
||||
Calculated Min Values x= 0 y=-2 dx= 0 dy= 0
|
||||
Pure Font ascent = 7 descent=-2
|
||||
X Font ascent = 7 descent=-2
|
||||
Max Font ascent = 8 descent=-2
|
||||
*/
|
||||
#include <utility/u8g.h>
|
||||
const u8g_fntpgm_uint8_t u8g_font_6x10_marlin[2617] U8G_SECTION(".progmem.u8g_font_6x10_marlin") = {
|
||||
0,6,9,0,254,7,1,153,3,43,32,255,254,8,254,7,
|
||||
254,0,0,0,6,0,0,1,7,7,6,2,0,128,128,128,
|
||||
128,128,0,128,3,3,3,6,1,4,160,160,160,5,7,7,
|
||||
6,0,0,80,80,248,80,248,80,80,5,7,7,6,0,0,
|
||||
32,112,160,112,40,112,32,5,7,7,6,0,0,72,168,80,
|
||||
32,80,168,144,5,7,7,6,0,0,64,160,160,64,168,144,
|
||||
104,1,3,3,6,2,4,128,128,128,3,7,7,6,1,0,
|
||||
32,64,128,128,128,64,32,3,7,7,6,1,0,128,64,32,
|
||||
32,32,64,128,5,5,5,6,0,1,136,80,248,80,136,5,
|
||||
5,5,6,0,1,32,32,248,32,32,3,3,3,6,1,255,
|
||||
96,64,128,5,1,1,6,0,3,248,3,3,3,6,1,255,
|
||||
64,224,64,5,7,7,6,0,0,8,8,16,32,64,128,128,
|
||||
5,7,7,6,0,0,32,80,136,136,136,80,32,5,7,7,
|
||||
6,0,0,32,96,160,32,32,32,248,5,7,7,6,0,0,
|
||||
112,136,8,48,64,128,248,5,7,7,6,0,0,248,8,16,
|
||||
48,8,136,112,5,7,7,6,0,0,16,48,80,144,248,16,
|
||||
16,5,7,7,6,0,0,248,128,176,200,8,136,112,5,7,
|
||||
7,6,0,0,48,64,128,176,200,136,112,5,7,7,6,0,
|
||||
0,248,8,16,16,32,64,64,5,7,7,6,0,0,112,136,
|
||||
136,112,136,136,112,5,7,7,6,0,0,112,136,152,104,8,
|
||||
16,96,3,7,7,6,1,255,64,224,64,0,64,224,64,3,
|
||||
7,7,6,1,255,64,224,64,0,96,64,128,4,7,7,6,
|
||||
1,0,16,32,64,128,64,32,16,5,3,3,6,0,2,248,
|
||||
0,248,4,7,7,6,1,0,128,64,32,16,32,64,128,5,
|
||||
7,7,6,0,0,112,136,16,32,32,0,32,5,7,7,6,
|
||||
0,0,112,136,152,168,176,128,112,5,7,7,6,0,0,32,
|
||||
80,136,136,248,136,136,5,7,7,6,0,0,240,72,72,112,
|
||||
72,72,240,5,7,7,6,0,0,112,136,128,128,128,136,112,
|
||||
5,7,7,6,0,0,240,72,72,72,72,72,240,5,7,7,
|
||||
6,0,0,248,128,128,240,128,128,248,5,7,7,6,0,0,
|
||||
248,128,128,240,128,128,128,5,7,7,6,0,0,112,136,128,
|
||||
128,152,136,112,5,7,7,6,0,0,136,136,136,248,136,136,
|
||||
136,3,7,7,6,1,0,224,64,64,64,64,64,224,5,7,
|
||||
7,6,0,0,56,16,16,16,16,144,96,5,7,7,6,0,
|
||||
0,136,144,160,192,160,144,136,5,7,7,6,0,0,128,128,
|
||||
128,128,128,128,248,5,7,7,6,0,0,136,136,216,168,136,
|
||||
136,136,5,7,7,6,0,0,136,136,200,168,152,136,136,5,
|
||||
7,7,6,0,0,112,136,136,136,136,136,112,5,7,7,6,
|
||||
0,0,240,136,136,240,128,128,128,5,8,8,6,0,255,112,
|
||||
136,136,136,136,168,112,8,5,7,7,6,0,0,240,136,136,
|
||||
240,160,144,136,5,7,7,6,0,0,112,136,128,112,8,136,
|
||||
112,5,7,7,6,0,0,248,32,32,32,32,32,32,5,7,
|
||||
7,6,0,0,136,136,136,136,136,136,112,5,7,7,6,0,
|
||||
0,136,136,136,80,80,80,32,5,7,7,6,0,0,136,136,
|
||||
136,168,168,216,136,5,7,7,6,0,0,136,136,80,32,80,
|
||||
136,136,5,7,7,6,0,0,136,136,80,32,32,32,32,5,
|
||||
7,7,6,0,0,248,8,16,32,64,128,248,3,7,7,6,
|
||||
1,0,224,128,128,128,128,128,224,5,7,7,6,0,0,128,
|
||||
128,64,32,16,8,8,3,7,7,6,1,0,224,32,32,32,
|
||||
32,32,224,5,3,3,6,0,4,32,80,136,5,1,1,6,
|
||||
0,255,248,2,2,2,6,2,6,128,64,5,5,5,6,0,
|
||||
0,112,8,120,136,120,5,7,7,6,0,0,128,128,176,200,
|
||||
136,200,176,5,5,5,6,0,0,112,136,128,136,112,5,7,
|
||||
7,6,0,0,8,8,104,152,136,152,104,5,5,5,6,0,
|
||||
0,112,136,248,128,112,5,7,7,6,0,0,48,72,64,240,
|
||||
64,64,64,5,7,7,6,0,254,120,136,136,120,8,136,112,
|
||||
5,7,7,6,0,0,128,128,176,200,136,136,136,3,7,7,
|
||||
6,1,0,64,0,192,64,64,64,224,4,9,9,6,1,254,
|
||||
16,0,48,16,16,16,144,144,96,5,7,7,6,0,0,128,
|
||||
128,136,144,224,144,136,3,7,7,6,1,0,192,64,64,64,
|
||||
64,64,224,5,5,5,6,0,0,208,168,168,168,136,5,5,
|
||||
5,6,0,0,176,200,136,136,136,5,5,5,6,0,0,112,
|
||||
136,136,136,112,5,7,7,6,0,254,176,200,136,200,176,128,
|
||||
128,5,7,7,6,0,254,104,152,136,152,104,8,8,5,5,
|
||||
5,6,0,0,176,200,128,128,128,5,5,5,6,0,0,112,
|
||||
128,112,8,240,5,7,7,6,0,0,64,64,240,64,64,72,
|
||||
48,5,5,5,6,0,0,136,136,136,152,104,5,5,5,6,
|
||||
0,0,136,136,80,80,32,5,5,5,6,0,0,136,136,168,
|
||||
168,80,5,5,5,6,0,0,136,80,32,80,136,5,7,7,
|
||||
6,0,254,136,136,152,104,8,136,112,5,5,5,6,0,0,
|
||||
248,16,32,64,248,4,7,7,6,1,0,48,64,32,192,32,
|
||||
64,48,1,7,7,6,2,0,128,128,128,128,128,128,128,4,
|
||||
7,7,6,1,0,192,32,64,48,64,32,192,5,3,3,6,
|
||||
0,4,72,168,144,0,0,0,1,0,0,0,0,0,1,0,
|
||||
0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,
|
||||
1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,
|
||||
0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,
|
||||
0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,
|
||||
1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,
|
||||
0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,
|
||||
0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,
|
||||
1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,
|
||||
0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,
|
||||
0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,
|
||||
1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,
|
||||
0,0,1,0,0,0,0,0,1,0,0,0,0,0,6,0,
|
||||
0,1,7,7,6,2,0,128,0,128,128,128,128,128,5,7,
|
||||
7,6,0,255,32,120,160,160,160,120,32,5,7,7,6,0,
|
||||
0,48,72,64,224,64,72,176,5,5,5,6,0,0,136,112,
|
||||
80,112,136,5,8,8,6,0,255,136,136,80,32,248,32,32,
|
||||
32,1,7,7,6,2,0,128,128,128,0,128,128,128,5,8,
|
||||
8,6,0,255,112,128,224,144,72,56,8,112,3,1,1,6,
|
||||
1,7,160,5,7,7,6,0,0,112,136,168,200,168,136,112,
|
||||
4,6,6,6,1,1,112,144,176,80,0,240,6,5,5,6,
|
||||
0,0,36,72,144,72,36,4,2,2,6,1,2,240,16,4,
|
||||
1,1,6,1,3,240,5,7,7,6,0,0,112,136,232,200,
|
||||
200,136,112,5,1,1,6,0,7,248,3,3,3,6,1,4,
|
||||
64,160,64,5,6,6,6,0,0,32,32,248,32,32,248,4,
|
||||
5,5,6,1,3,96,144,32,64,240,4,5,5,6,1,3,
|
||||
224,16,96,16,224,2,2,2,6,2,6,64,128,5,6,6,
|
||||
6,0,255,136,136,136,200,176,128,5,7,7,6,0,0,120,
|
||||
232,232,104,40,40,40,1,1,1,6,2,3,128,2,2,2,
|
||||
6,2,254,64,128,3,5,5,6,1,3,64,192,64,64,224,
|
||||
4,6,6,6,1,1,96,144,144,96,0,240,6,5,5,6,
|
||||
0,0,144,72,36,72,144,6,9,9,6,0,255,64,192,64,
|
||||
64,228,12,20,60,4,6,9,9,6,0,255,64,192,64,64,
|
||||
232,20,4,8,28,5,9,9,6,0,255,192,32,64,32,200,
|
||||
24,40,120,8,5,7,7,6,0,0,32,0,32,32,64,136,
|
||||
112,5,8,8,6,0,0,64,32,112,136,136,248,136,136,5,
|
||||
8,8,6,0,0,16,32,112,136,136,248,136,136,5,8,8,
|
||||
6,0,0,32,80,112,136,136,248,136,136,5,8,8,6,0,
|
||||
0,72,176,112,136,136,248,136,136,5,8,8,6,0,0,80,
|
||||
0,112,136,136,248,136,136,5,8,8,6,0,0,32,80,112,
|
||||
136,136,248,136,136,6,7,7,6,0,0,60,80,144,156,240,
|
||||
144,156,5,9,9,6,0,254,112,136,128,128,128,136,112,32,
|
||||
64,5,8,8,6,0,0,64,248,128,128,240,128,128,248,5,
|
||||
8,8,6,0,0,16,248,128,128,240,128,128,248,5,8,8,
|
||||
6,0,0,32,248,128,128,240,128,128,248,5,8,8,6,0,
|
||||
0,80,248,128,128,240,128,128,248,3,8,8,6,1,0,128,
|
||||
64,224,64,64,64,64,224,3,8,8,6,1,0,32,64,224,
|
||||
64,64,64,64,224,3,8,8,6,1,0,64,160,224,64,64,
|
||||
64,64,224,3,8,8,6,1,0,160,0,224,64,64,64,64,
|
||||
224,5,7,7,6,0,0,240,72,72,232,72,72,240,5,8,
|
||||
8,6,0,0,40,80,136,200,168,152,136,136,5,8,8,6,
|
||||
0,0,64,32,112,136,136,136,136,112,5,8,8,6,0,0,
|
||||
16,32,112,136,136,136,136,112,5,8,8,6,0,0,32,80,
|
||||
112,136,136,136,136,112,5,8,8,6,0,0,40,80,112,136,
|
||||
136,136,136,112,5,8,8,6,0,0,80,0,112,136,136,136,
|
||||
136,112,5,5,5,6,0,0,136,80,32,80,136,5,7,7,
|
||||
6,0,0,112,152,152,168,200,200,112,5,8,8,6,0,0,
|
||||
64,32,136,136,136,136,136,112,5,8,8,6,0,0,16,32,
|
||||
136,136,136,136,136,112,5,8,8,6,0,0,32,80,0,136,
|
||||
136,136,136,112,5,8,8,6,0,0,80,0,136,136,136,136,
|
||||
136,112,5,8,8,6,0,0,16,32,136,136,80,32,32,32,
|
||||
5,7,7,6,0,0,128,240,136,240,128,128,128,5,7,7,
|
||||
6,0,0,112,136,144,160,144,136,176,5,8,8,6,0,0,
|
||||
64,32,0,112,8,120,136,120,5,8,8,6,0,0,16,32,
|
||||
0,112,8,120,136,120,5,8,8,6,0,0,32,80,0,112,
|
||||
8,120,136,120,5,8,8,6,0,0,40,80,0,112,8,120,
|
||||
136,120,5,7,7,6,0,0,80,0,112,8,120,136,120,5,
|
||||
8,8,6,0,0,32,80,32,112,8,120,136,120,6,5,5,
|
||||
6,0,0,120,20,124,144,124,5,7,7,6,0,254,112,136,
|
||||
128,136,112,32,64,5,8,8,6,0,0,64,32,0,112,136,
|
||||
248,128,112,5,8,8,6,0,0,16,32,0,112,136,248,128,
|
||||
112,5,8,8,6,0,0,32,80,0,112,136,248,128,112,5,
|
||||
7,7,6,0,0,80,0,112,136,248,128,112,3,8,8,6,
|
||||
1,0,128,64,0,192,64,64,64,224,3,8,8,6,1,0,
|
||||
64,128,0,192,64,64,64,224,3,8,8,6,1,0,64,160,
|
||||
0,192,64,64,64,224,6,10,10,6,0,254,164,168,0,252,
|
||||
132,128,128,128,132,252,6,10,10,6,0,254,84,148,0,252,
|
||||
132,4,4,4,132,252,5,8,8,6,0,0,40,80,0,176,
|
||||
200,136,136,136,5,8,8,6,0,0,64,32,0,112,136,136,
|
||||
136,112,4,10,10,6,2,254,48,64,128,144,144,144,144,144,
|
||||
144,144,4,10,10,6,0,254,192,32,16,144,144,144,144,144,
|
||||
144,144,6,7,7,6,0,1,68,140,140,132,128,64,60,6,
|
||||
7,7,6,0,1,136,196,196,132,4,8,240,5,5,5,6,
|
||||
0,1,32,0,248,0,32,5,8,8,6,0,0,64,240,200,
|
||||
136,136,152,120,16,5,8,8,6,0,0,224,248,136,136,136,
|
||||
136,136,248,5,5,5,6,0,1,32,48,248,48,32,5,8,
|
||||
8,6,0,0,32,112,248,32,32,32,32,224,5,9,9,6,
|
||||
0,255,32,112,168,168,184,136,136,80,32,5,9,9,6,0,
|
||||
255,224,128,192,176,168,168,48,40,40,5,9,9,6,0,255,
|
||||
248,168,136,136,136,136,136,168,248,5,10,10,6,0,254,32,
|
||||
80,80,80,80,136,168,168,136,112};
|
||||
|
|
@ -1,481 +0,0 @@
|
|||
/**
|
||||
*dogm_lcd_implementation.h
|
||||
*
|
||||
*Graphics LCD implementation for 128x64 pixel LCDs by STB for ErikZalm/Marlin
|
||||
*Demonstrator: http://www.reprap.org/wiki/STB_Electronics
|
||||
*License: http://opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
*With the use of:
|
||||
*u8glib by Oliver Kraus
|
||||
*http://code.google.com/p/u8glib/
|
||||
*License: http://opensource.org/licenses/BSD-3-Clause
|
||||
*/
|
||||
|
||||
|
||||
#ifndef ULTRA_LCD_IMPLEMENTATION_DOGM_H
|
||||
#define ULTRA_LCD_IMPLEMENTATION_DOGM_H
|
||||
|
||||
/**
|
||||
* Implementation of the LCD display routines for a DOGM128 graphic display. These are common LCD 128x64 pixel graphic displays.
|
||||
**/
|
||||
|
||||
#ifdef ULTIPANEL
|
||||
#define BLEN_A 0
|
||||
#define BLEN_B 1
|
||||
#define BLEN_C 2
|
||||
#define EN_A (1<<BLEN_A)
|
||||
#define EN_B (1<<BLEN_B)
|
||||
#define EN_C (1<<BLEN_C)
|
||||
#define encrot0 0
|
||||
#define encrot1 2
|
||||
#define encrot2 3
|
||||
#define encrot3 1
|
||||
#define LCD_CLICKED (buttons&EN_C)
|
||||
#endif
|
||||
|
||||
#include <U8glib.h>
|
||||
#include "DOGMbitmaps.h"
|
||||
#include "dogm_font_data_marlin.h"
|
||||
#include "ultralcd.h"
|
||||
#include "ultralcd_st7920_u8glib_rrd.h"
|
||||
|
||||
/* Russian language not supported yet, needs custom font
|
||||
|
||||
#ifdef LANGUAGE_RU
|
||||
#include "LiquidCrystal_Rus.h"
|
||||
#define LCD_CLASS LiquidCrystal_Rus
|
||||
#else
|
||||
#include <LiquidCrystal_Prusa.h>
|
||||
#define LCD_CLASS LiquidCrystal_Prusa
|
||||
#endif
|
||||
*/
|
||||
|
||||
// DOGM parameters (size in pixels)
|
||||
#define DOG_CHAR_WIDTH 6
|
||||
#define DOG_CHAR_HEIGHT 12
|
||||
#define DOG_CHAR_WIDTH_LARGE 9
|
||||
#define DOG_CHAR_HEIGHT_LARGE 18
|
||||
|
||||
#define START_ROW 0
|
||||
|
||||
/* Custom characters defined in font font_6x10_marlin.c */
|
||||
#define LCD_STR_DEGREE "\xB0"
|
||||
#define LCD_STR_REFRESH "\xF8"
|
||||
#define LCD_STR_FOLDER "\xF9"
|
||||
#define LCD_STR_ARROW_RIGHT "\xFA"
|
||||
#define LCD_STR_UPLEVEL "\xFB"
|
||||
#define LCD_STR_CLOCK "\xFC"
|
||||
#define LCD_STR_FEEDRATE "\xFD"
|
||||
#define LCD_STR_BEDTEMP "\xFE"
|
||||
#define LCD_STR_THERMOMETER "\xFF"
|
||||
|
||||
#define FONT_STATUSMENU u8g_font_6x9
|
||||
|
||||
int lcd_contrast;
|
||||
|
||||
// LCD selection
|
||||
#ifdef U8GLIB_ST7920
|
||||
//U8GLIB_ST7920_128X64_RRD u8g(0,0,0);
|
||||
U8GLIB_ST7920_128X64_RRD u8g(0);
|
||||
#elif defined(MAKRPANEL)
|
||||
// The MaKrPanel display, ST7565 controller as well
|
||||
U8GLIB_NHD_C12864 u8g(DOGLCD_CS, DOGLCD_A0);
|
||||
#else
|
||||
// for regular DOGM128 display with HW-SPI
|
||||
U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0); // HW-SPI Com: CS, A0
|
||||
#endif
|
||||
|
||||
static void lcd_implementation_init()
|
||||
{
|
||||
#ifdef LCD_PIN_BL
|
||||
pinMode(LCD_PIN_BL, OUTPUT); // Enable LCD backlight
|
||||
digitalWrite(LCD_PIN_BL, HIGH);
|
||||
#endif
|
||||
|
||||
u8g.setContrast(lcd_contrast);
|
||||
// Uncomment this if you have the first generation (V1.10) of STBs board
|
||||
// pinMode(17, OUTPUT); // Enable LCD backlight
|
||||
// digitalWrite(17, HIGH);
|
||||
|
||||
u8g.firstPage();
|
||||
do {
|
||||
u8g.setFont(u8g_font_6x10_marlin);
|
||||
u8g.setColorIndex(1);
|
||||
u8g.drawBox (0, 0, u8g.getWidth(), u8g.getHeight());
|
||||
u8g.setColorIndex(1);
|
||||
} while( u8g.nextPage() );
|
||||
|
||||
#ifdef LCD_SCREEN_ROT_90
|
||||
u8g.setRot90(); // Rotate screen by 90°
|
||||
#endif
|
||||
|
||||
#ifdef LCD_SCREEN_ROT_180
|
||||
u8g.setRot180(); // Rotate screen by 180°
|
||||
#endif
|
||||
|
||||
#ifdef LCD_SCREEN_ROT_270
|
||||
u8g.setRot270(); // Rotate screen by 270°
|
||||
#endif
|
||||
|
||||
|
||||
u8g.firstPage();
|
||||
do {
|
||||
// RepRap init bmp
|
||||
u8g.drawBitmapP(0,0,START_BMPBYTEWIDTH,START_BMPHEIGHT,start_bmp);
|
||||
// Welcome message
|
||||
u8g.setFont(u8g_font_6x10_marlin);
|
||||
u8g.drawStr(62,10,"MARLIN");
|
||||
u8g.setFont(u8g_font_5x8);
|
||||
u8g.drawStr(62,19,"V1.0.2");
|
||||
u8g.setFont(u8g_font_6x10_marlin);
|
||||
u8g.drawStr(62,28,"by ErikZalm");
|
||||
u8g.drawStr(62,41,"DOGM128 LCD");
|
||||
u8g.setFont(u8g_font_5x8);
|
||||
u8g.drawStr(62,48,"enhancements");
|
||||
u8g.setFont(u8g_font_5x8);
|
||||
u8g.drawStr(62,55,"by STB, MM");
|
||||
u8g.drawStr(62,61,"uses u");
|
||||
u8g.drawStr90(92,57,"8");
|
||||
u8g.drawStr(100,61,"glib");
|
||||
} while( u8g.nextPage() );
|
||||
}
|
||||
|
||||
static void lcd_implementation_clear()
|
||||
{
|
||||
// NO NEED TO IMPLEMENT LIKE SO. Picture loop automatically clears the display.
|
||||
//
|
||||
// Check this article: http://arduino.cc/forum/index.php?topic=91395.25;wap2
|
||||
//
|
||||
// u8g.firstPage();
|
||||
// do {
|
||||
// u8g.setColorIndex(0);
|
||||
// u8g.drawBox (0, 0, u8g.getWidth(), u8g.getHeight());
|
||||
// u8g.setColorIndex(1);
|
||||
// } while( u8g.nextPage() );
|
||||
}
|
||||
|
||||
/* Arduino < 1.0.0 is missing a function to print PROGMEM strings, so we need to implement our own */
|
||||
static void lcd_printPGM(const char* str)
|
||||
{
|
||||
char c;
|
||||
while((c = pgm_read_byte(str++)) != '\0')
|
||||
{
|
||||
u8g.print(c);
|
||||
}
|
||||
}
|
||||
|
||||
static void _draw_heater_status(int x, int heater) {
|
||||
bool isBed = heater < 0;
|
||||
int y = 17 + (isBed ? 1 : 0);
|
||||
u8g.setFont(FONT_STATUSMENU);
|
||||
u8g.setPrintPos(x,6);
|
||||
u8g.print(itostr3(int((heater >= 0 ? degTargetHotend(heater) : degTargetBed()) + 0.5)));
|
||||
lcd_printPGM(PSTR(LCD_STR_DEGREE " "));
|
||||
u8g.setPrintPos(x,27);
|
||||
u8g.print(itostr3(int(heater >= 0 ? degHotend(heater) : degBed()) + 0.5));
|
||||
lcd_printPGM(PSTR(LCD_STR_DEGREE " "));
|
||||
if (!isHeatingHotend(0)) {
|
||||
u8g.drawBox(x+7,y,2,2);
|
||||
}
|
||||
else {
|
||||
u8g.setColorIndex(0); // white on black
|
||||
u8g.drawBox(x+7,y,2,2);
|
||||
u8g.setColorIndex(1); // black on white
|
||||
}
|
||||
}
|
||||
|
||||
static void lcd_implementation_status_screen()
|
||||
{
|
||||
|
||||
static unsigned char fan_rot = 0;
|
||||
|
||||
u8g.setColorIndex(1); // black on white
|
||||
|
||||
// Symbols menu graphics, animated fan
|
||||
u8g.drawBitmapP(9,1,STATUS_SCREENBYTEWIDTH,STATUS_SCREENHEIGHT, (blink % 2) && fanSpeed ? status_screen0_bmp : status_screen1_bmp);
|
||||
|
||||
#ifdef SDSUPPORT
|
||||
//SD Card Symbol
|
||||
u8g.drawBox(42,42,8,7);
|
||||
u8g.drawBox(50,44,2,5);
|
||||
u8g.drawFrame(42,49,10,4);
|
||||
u8g.drawPixel(50,43);
|
||||
// Progress bar
|
||||
u8g.drawFrame(54,49,73,4);
|
||||
|
||||
// SD Card Progress bar and clock
|
||||
u8g.setFont(FONT_STATUSMENU);
|
||||
|
||||
if (IS_SD_PRINTING)
|
||||
{
|
||||
// Progress bar
|
||||
u8g.drawBox(55,50, (unsigned int)( (71 * card.percentDone())/100) ,2);
|
||||
}
|
||||
else {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
u8g.setPrintPos(80,47);
|
||||
if(starttime != 0)
|
||||
{
|
||||
uint16_t time = millis()/60000 - starttime/60000;
|
||||
|
||||
u8g.print(itostr2(time/60));
|
||||
u8g.print(':');
|
||||
u8g.print(itostr2(time%60));
|
||||
}else{
|
||||
lcd_printPGM(PSTR("--:--"));
|
||||
}
|
||||
#endif
|
||||
|
||||
// Extruders
|
||||
_draw_heater_status(6, 0);
|
||||
#if EXTRUDERS > 1
|
||||
_draw_heater_status(31, 1);
|
||||
#if EXTRUDERS > 2
|
||||
_draw_heater_status(55, 2);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Heatbed
|
||||
_draw_heater_status(81, -1);
|
||||
|
||||
// Fan
|
||||
u8g.setFont(FONT_STATUSMENU);
|
||||
u8g.setPrintPos(104,27);
|
||||
#if defined(FAN_PIN) && FAN_PIN > -1
|
||||
u8g.print(itostr3(int((fanSpeed*100)/256 + 1)));
|
||||
u8g.print("%");
|
||||
#else
|
||||
u8g.print("---");
|
||||
#endif
|
||||
|
||||
|
||||
// X, Y, Z-Coordinates
|
||||
u8g.setFont(FONT_STATUSMENU);
|
||||
u8g.drawBox(0,29,128,10);
|
||||
u8g.setColorIndex(0); // white on black
|
||||
u8g.setPrintPos(2,37);
|
||||
u8g.print("X");
|
||||
u8g.drawPixel(8,33);
|
||||
u8g.drawPixel(8,35);
|
||||
u8g.setPrintPos(10,37);
|
||||
u8g.print(ftostr31ns(current_position[X_AXIS]));
|
||||
u8g.setPrintPos(43,37);
|
||||
lcd_printPGM(PSTR("Y"));
|
||||
u8g.drawPixel(49,33);
|
||||
u8g.drawPixel(49,35);
|
||||
u8g.setPrintPos(51,37);
|
||||
u8g.print(ftostr31ns(current_position[Y_AXIS]));
|
||||
u8g.setPrintPos(83,37);
|
||||
u8g.print("Z");
|
||||
u8g.drawPixel(89,33);
|
||||
u8g.drawPixel(89,35);
|
||||
u8g.setPrintPos(91,37);
|
||||
u8g.print(ftostr31(current_position[Z_AXIS]));
|
||||
u8g.setColorIndex(1); // black on white
|
||||
|
||||
// Feedrate
|
||||
u8g.setFont(u8g_font_6x10_marlin);
|
||||
u8g.setPrintPos(3,49);
|
||||
u8g.print(LCD_STR_FEEDRATE[0]);
|
||||
u8g.setFont(FONT_STATUSMENU);
|
||||
u8g.setPrintPos(12,48);
|
||||
u8g.print(itostr3(feedmultiply));
|
||||
u8g.print('%');
|
||||
|
||||
// Status line
|
||||
u8g.setFont(FONT_STATUSMENU);
|
||||
u8g.setPrintPos(0,61);
|
||||
#ifndef FILAMENT_LCD_DISPLAY
|
||||
u8g.print(lcd_status_message);
|
||||
#else
|
||||
if(message_millis+5000>millis()){ //Display both Status message line and Filament display on the last line
|
||||
u8g.print(lcd_status_message);
|
||||
}
|
||||
else
|
||||
{
|
||||
lcd_printPGM(PSTR("dia:"));
|
||||
u8g.print(ftostr12ns(filament_width_meas));
|
||||
lcd_printPGM(PSTR(" factor:"));
|
||||
u8g.print(itostr3(extrudemultiply));
|
||||
u8g.print('%');
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
static void lcd_implementation_drawmenu_generic(uint8_t row, const char* pstr, char pre_char, char post_char)
|
||||
{
|
||||
char c;
|
||||
|
||||
uint8_t n = LCD_WIDTH - 1 - 2;
|
||||
|
||||
if ((pre_char == '>') || (pre_char == LCD_STR_UPLEVEL[0] ))
|
||||
{
|
||||
u8g.setColorIndex(1); // black on white
|
||||
u8g.drawBox (0, row*DOG_CHAR_HEIGHT + 3, 128, DOG_CHAR_HEIGHT);
|
||||
u8g.setColorIndex(0); // following text must be white on black
|
||||
} else u8g.setColorIndex(1); // unmarked text is black on white
|
||||
|
||||
u8g.setPrintPos(0 * DOG_CHAR_WIDTH, (row + 1) * DOG_CHAR_HEIGHT);
|
||||
u8g.print(pre_char == '>' ? ' ' : pre_char); // Row selector is obsolete
|
||||
|
||||
|
||||
while( (c = pgm_read_byte(pstr)) != '\0' )
|
||||
{
|
||||
u8g.print(c);
|
||||
pstr++;
|
||||
n--;
|
||||
}
|
||||
while(n--){
|
||||
u8g.print(' ');
|
||||
}
|
||||
|
||||
u8g.print(post_char);
|
||||
u8g.print(' ');
|
||||
u8g.setColorIndex(1); // restore settings to black on white
|
||||
}
|
||||
|
||||
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 - 1 - 2 - (pgm ? strlen_P(data) : strlen(data));
|
||||
|
||||
u8g.setPrintPos(0 * DOG_CHAR_WIDTH, (row + 1) * DOG_CHAR_HEIGHT);
|
||||
u8g.print(pre_char);
|
||||
|
||||
while( (c = pgm_read_byte(pstr)) != '\0' ) {
|
||||
u8g.print(c);
|
||||
pstr++;
|
||||
n--;
|
||||
}
|
||||
|
||||
u8g.print(':');
|
||||
|
||||
while(n--) u8g.print(' ');
|
||||
|
||||
if (pgm) { lcd_printPGM(data); } else { u8g.print(data); }
|
||||
}
|
||||
|
||||
#define lcd_implementation_drawmenu_setting_edit_generic(row, pstr, pre_char, data) _drawmenu_setting_edit_generic(row, pstr, pre_char, data, false)
|
||||
#define lcd_implementation_drawmenu_setting_edit_generic_P(row, pstr, pre_char, data) _drawmenu_setting_edit_generic(row, pstr, pre_char, data, true)
|
||||
|
||||
extern char *wfac_to_str5(const uint8_t &x);
|
||||
extern char *mres_to_str3(const uint8_t &x);
|
||||
|
||||
#define lcd_implementation_drawmenu_setting_edit_wfac_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', wfac_to_str5(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_wfac(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', wfac_to_str5(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_mres_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', mres_to_str3(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_mres(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', mres_to_str3(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_byte3_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', itostr3((uint8_t)*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_byte3(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', itostr3((uint8_t)*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_int3_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', itostr3(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_int3(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', itostr3(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_float3_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr3(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_float3(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr3(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_float32_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr32(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_float32(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr32(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_float43_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr43(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_float43(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr43(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_float5_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr5(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_float5(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr5(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_float52_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr52(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_float52(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr52(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_float51_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr51(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_float51(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr51(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_long5_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr5(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_long5(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr5(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_bool_selected(row, pstr, pstr2, data) lcd_implementation_drawmenu_setting_edit_generic_P(row, pstr, '>', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF))
|
||||
#define lcd_implementation_drawmenu_setting_edit_bool(row, pstr, pstr2, data) lcd_implementation_drawmenu_setting_edit_generic_P(row, pstr, ' ', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF))
|
||||
|
||||
//Add version for callback functions
|
||||
#define lcd_implementation_drawmenu_setting_edit_callback_int3_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', itostr3(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_callback_int3(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', itostr3(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_callback_float3_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr3(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_callback_float3(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr3(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_callback_float32_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr32(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_callback_float32(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr32(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_callback_float43_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr43(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_callback_float43(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr43(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_callback_float5_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr5(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_callback_float5(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr5(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_callback_float52_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr52(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_callback_float52(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr52(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_callback_float51_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr51(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_callback_float51(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr51(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_callback_long5_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr5(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_callback_long5(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr5(*(data)))
|
||||
#define lcd_implementation_drawmenu_setting_edit_callback_bool_selected(row, pstr, pstr2, data, callback) lcd_implementation_drawmenu_setting_edit_generic_P(row, pstr, '>', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF))
|
||||
#define lcd_implementation_drawmenu_setting_edit_callback_bool(row, pstr, pstr2, data, callback) lcd_implementation_drawmenu_setting_edit_generic_P(row, pstr, ' ', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF))
|
||||
|
||||
void lcd_implementation_drawedit(const char* pstr, char* value)
|
||||
{
|
||||
u8g.setPrintPos(0 * DOG_CHAR_WIDTH_LARGE, (u8g.getHeight() - 1 - DOG_CHAR_HEIGHT_LARGE) - (1 * DOG_CHAR_HEIGHT_LARGE) - START_ROW );
|
||||
u8g.setFont(u8g_font_9x18);
|
||||
lcd_printPGM(pstr);
|
||||
u8g.print(':');
|
||||
u8g.setPrintPos((14 - strlen(value)) * DOG_CHAR_WIDTH_LARGE, (u8g.getHeight() - 1 - DOG_CHAR_HEIGHT_LARGE) - (1 * DOG_CHAR_HEIGHT_LARGE) - START_ROW );
|
||||
u8g.print(value);
|
||||
}
|
||||
|
||||
static void _drawmenu_sd(uint8_t row, const char* pstr, const char* filename, char * const longFilename, bool isDir, bool isSelected) {
|
||||
char c;
|
||||
uint8_t n = LCD_WIDTH - 1;
|
||||
|
||||
if (longFilename[0] != '\0') {
|
||||
filename = longFilename;
|
||||
longFilename[n] = '\0';
|
||||
}
|
||||
|
||||
if (isSelected) {
|
||||
u8g.setColorIndex(1); // black on white
|
||||
u8g.drawBox (0, row*DOG_CHAR_HEIGHT + 3, 128, DOG_CHAR_HEIGHT);
|
||||
u8g.setColorIndex(0); // following text must be white on black
|
||||
}
|
||||
|
||||
u8g.setPrintPos(0 * DOG_CHAR_WIDTH, (row + 1) * DOG_CHAR_HEIGHT);
|
||||
u8g.print(' '); // Indent by 1 char
|
||||
|
||||
if (isDir) u8g.print(LCD_STR_FOLDER[0]);
|
||||
|
||||
while((c = *filename) != '\0') {
|
||||
u8g.print(c);
|
||||
filename++;
|
||||
n--;
|
||||
}
|
||||
while(n--) u8g.print(' ');
|
||||
|
||||
if (isSelected) u8g.setColorIndex(1); // black on white
|
||||
}
|
||||
|
||||
#define lcd_implementation_drawmenu_sdfile_selected(row, pstr, filename, longFilename) _drawmenu_sd(row, pstr, filename, longFilename, false, true)
|
||||
#define lcd_implementation_drawmenu_sdfile(row, pstr, filename, longFilename) _drawmenu_sd(row, pstr, filename, longFilename, false, false)
|
||||
#define lcd_implementation_drawmenu_sddirectory_selected(row, pstr, filename, longFilename) _drawmenu_sd(row, pstr, filename, longFilename, true, true)
|
||||
#define lcd_implementation_drawmenu_sddirectory(row, pstr, filename, longFilename) _drawmenu_sd(row, pstr, filename, longFilename, true, false)
|
||||
|
||||
#define lcd_implementation_drawmenu_back_selected(row, pstr, data) lcd_implementation_drawmenu_generic(row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0])
|
||||
#define lcd_implementation_drawmenu_back(row, pstr, data) lcd_implementation_drawmenu_generic(row, pstr, ' ', LCD_STR_UPLEVEL[0])
|
||||
#define lcd_implementation_drawmenu_submenu_selected(row, pstr, data) lcd_implementation_drawmenu_generic(row, pstr, '>', LCD_STR_ARROW_RIGHT[0])
|
||||
#define lcd_implementation_drawmenu_submenu(row, pstr, data) lcd_implementation_drawmenu_generic(row, pstr, ' ', LCD_STR_ARROW_RIGHT[0])
|
||||
#define lcd_implementation_drawmenu_gcode_selected(row, pstr, gcode) lcd_implementation_drawmenu_generic(row, pstr, '>', ' ')
|
||||
#define lcd_implementation_drawmenu_gcode(row, pstr, gcode) lcd_implementation_drawmenu_generic(row, pstr, ' ', ' ')
|
||||
#define lcd_implementation_drawmenu_function_selected(row, pstr, data) lcd_implementation_drawmenu_generic(row, pstr, '>', ' ')
|
||||
#define lcd_implementation_drawmenu_function(row, pstr, data) lcd_implementation_drawmenu_generic(row, pstr, ' ', ' ')
|
||||
|
||||
static void lcd_implementation_quick_feedback()
|
||||
{
|
||||
|
||||
#if BEEPER > -1
|
||||
SET_OUTPUT(BEEPER);
|
||||
for(int8_t i=0;i<10;i++)
|
||||
{
|
||||
WRITE(BEEPER,HIGH);
|
||||
delay(3);
|
||||
WRITE(BEEPER,LOW);
|
||||
delay(3);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif//ULTRA_LCD_IMPLEMENTATION_DOGM_H
|
||||
|
||||
|
|
@ -1017,7 +1017,7 @@ void st_init()
|
|||
tmc2130_init();
|
||||
#endif //TMC2130
|
||||
|
||||
digipot_init(); //Initialize Digipot Motor Current
|
||||
st_current_init(); //Initialize Digipot Motor Current
|
||||
microstep_init(); //Initialize Microstepping Pins
|
||||
|
||||
//Initialize Dir Pins
|
||||
|
@ -1455,22 +1455,10 @@ void EEPROM_read_st(int pos, uint8_t* value, uint8_t size)
|
|||
}
|
||||
|
||||
|
||||
void digipot_init() //Initialize Digipot Motor Current
|
||||
void st_current_init() //Initialize Digipot Motor Current
|
||||
{
|
||||
EEPROM_read_st(EEPROM_SILENT,(uint8_t*)&SilentMode,sizeof(SilentMode));
|
||||
SilentModeMenu = SilentMode;
|
||||
#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
|
||||
if(SilentMode == 0){
|
||||
const uint8_t digipot_motor_current[] = DIGIPOT_MOTOR_CURRENT_LOUD;
|
||||
}else{
|
||||
const uint8_t digipot_motor_current[] = DIGIPOT_MOTOR_CURRENT;
|
||||
}
|
||||
SPI.begin();
|
||||
pinMode(DIGIPOTSS_PIN, OUTPUT);
|
||||
for(int i=0;i<=4;i++)
|
||||
//digitalPotWrite(digipot_ch[i], digipot_motor_current[i]);
|
||||
digipot_current(i,digipot_motor_current[i]);
|
||||
#endif
|
||||
#ifdef MOTOR_CURRENT_PWM_XY_PIN
|
||||
pinMode(MOTOR_CURRENT_PWM_XY_PIN, OUTPUT);
|
||||
pinMode(MOTOR_CURRENT_PWM_Z_PIN, OUTPUT);
|
||||
|
@ -1488,9 +1476,9 @@ void digipot_init() //Initialize Digipot Motor Current
|
|||
motor_current_setting[2] = motor_current_setting_silent[2];
|
||||
|
||||
}
|
||||
digipot_current(0, motor_current_setting[0]);
|
||||
digipot_current(1, motor_current_setting[1]);
|
||||
digipot_current(2, motor_current_setting[2]);
|
||||
st_current_set(0, motor_current_setting[0]);
|
||||
st_current_set(1, motor_current_setting[1]);
|
||||
st_current_set(2, motor_current_setting[2]);
|
||||
//Set timer5 to 31khz so the PWM of the motor power is as constant as possible. (removes a buzzing noise)
|
||||
TCCR5B = (TCCR5B & ~(_BV(CS50) | _BV(CS51) | _BV(CS52))) | _BV(CS50);
|
||||
#endif
|
||||
|
@ -1499,12 +1487,8 @@ void digipot_init() //Initialize Digipot Motor Current
|
|||
|
||||
|
||||
|
||||
void digipot_current(uint8_t driver, int current)
|
||||
void st_current_set(uint8_t driver, int current)
|
||||
{
|
||||
#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
|
||||
const uint8_t digipot_ch[] = DIGIPOT_CHANNELS;
|
||||
digitalPotWrite(digipot_ch[driver], current);
|
||||
#endif
|
||||
#ifdef MOTOR_CURRENT_PWM_XY_PIN
|
||||
if (driver == 0) analogWrite(MOTOR_CURRENT_PWM_XY_PIN, (long)current * 255L / (long)MOTOR_CURRENT_PWM_RANGE);
|
||||
if (driver == 1) analogWrite(MOTOR_CURRENT_PWM_Z_PIN, (long)current * 255L / (long)MOTOR_CURRENT_PWM_RANGE);
|
||||
|
|
|
@ -96,8 +96,8 @@ void quickStop();
|
|||
void digitalPotWrite(int address, int value);
|
||||
void microstep_ms(uint8_t driver, int8_t ms1, int8_t ms2);
|
||||
void microstep_mode(uint8_t driver, uint8_t stepping);
|
||||
void digipot_init();
|
||||
void digipot_current(uint8_t driver, int current);
|
||||
void st_current_init();
|
||||
void st_current_set(uint8_t driver, int current);
|
||||
void microstep_init();
|
||||
void microstep_readings();
|
||||
|
||||
|
|
|
@ -183,11 +183,7 @@ uint8_t lcd_status_message_level;
|
|||
char lcd_status_message[LCD_WIDTH + 1] = ""; //////WELCOME!
|
||||
unsigned char firstrun = 1;
|
||||
|
||||
#ifdef DOGLCD
|
||||
#include "dogm_lcd_implementation.h"
|
||||
#else
|
||||
#include "ultralcd_implementation_hitachi_HD44780.h"
|
||||
#endif
|
||||
|
||||
/** forward declarations **/
|
||||
|
||||
|
@ -3530,7 +3526,7 @@ static void lcd_silent_mode_set() {
|
|||
st_reset_timer();
|
||||
sei();
|
||||
#endif //TMC2130
|
||||
digipot_init();
|
||||
st_current_init();
|
||||
#ifdef TMC2130
|
||||
if (CrashDetectMenu && SilentModeMenu)
|
||||
lcd_goto_menu(lcd_crash_mode_info2);
|
||||
|
@ -3644,7 +3640,7 @@ void lcd_pinda_calibration_menu()
|
|||
void lcd_temp_calibration_set() {
|
||||
temp_cal_active = !temp_cal_active;
|
||||
eeprom_update_byte((unsigned char *)EEPROM_TEMP_CAL_ACTIVE, temp_cal_active);
|
||||
digipot_init();
|
||||
st_current_init();
|
||||
lcd_goto_menu(lcd_settings_menu); //doesn't break menuStack
|
||||
}
|
||||
|
||||
|
@ -4104,6 +4100,7 @@ static void lcd_selftest_()
|
|||
lcd_selftest();
|
||||
}
|
||||
|
||||
#ifdef TMC2130
|
||||
static void lcd_ustep_linearity_menu_save()
|
||||
{
|
||||
eeprom_update_word((uint16_t*)EEPROM_TMC2130_WAVE_X_FAC, tmc2130_wave_fac[X_AXIS]);
|
||||
|
@ -4111,13 +4108,17 @@ static void lcd_ustep_linearity_menu_save()
|
|||
eeprom_update_word((uint16_t*)EEPROM_TMC2130_WAVE_Z_FAC, tmc2130_wave_fac[Z_AXIS]);
|
||||
eeprom_update_word((uint16_t*)EEPROM_TMC2130_WAVE_E_FAC, tmc2130_wave_fac[E_AXIS]);
|
||||
}
|
||||
#endif //TMC2130
|
||||
|
||||
static void lcd_settings_menu_back()
|
||||
{
|
||||
#ifdef TMC2130
|
||||
bool changed = false;
|
||||
if (tmc2130_wave_fac[E_AXIS] < TMC2130_WAVE_FAC1000_MIN) tmc2130_wave_fac[E_AXIS] = 0;
|
||||
changed |= (eeprom_read_word((uint16_t*)EEPROM_TMC2130_WAVE_E_FAC) != tmc2130_wave_fac[E_AXIS]);
|
||||
lcd_ustep_linearity_menu_save();
|
||||
if (changed) tmc2130_init();
|
||||
#endif //TMC2130
|
||||
currentMenu = lcd_main_menu;
|
||||
lcd_main_menu();
|
||||
}
|
||||
|
@ -5050,7 +5051,7 @@ void extr_unload() { //unloads filament
|
|||
|
||||
current_position[E_AXIS] += 10; //extrusion
|
||||
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 10, active_extruder);
|
||||
digipot_current(2, E_MOTOR_HIGH_CURRENT);
|
||||
st_current_set(2, E_MOTOR_HIGH_CURRENT);
|
||||
if (current_temperature[0] < 230) { //PLA & all other filaments
|
||||
current_position[E_AXIS] += 5.4;
|
||||
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 2800 / 60, active_extruder);
|
||||
|
@ -5079,9 +5080,9 @@ void extr_unload() { //unloads filament
|
|||
current_position[E_AXIS] -= (bowden_length[snmm_extruder] + 60 + FIL_LOAD_LENGTH) / 2;
|
||||
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 500, active_extruder);
|
||||
st_synchronize();
|
||||
//digipot_init();
|
||||
if (SilentMode == 1) digipot_current(2, tmp_motor[2]); //set back to normal operation currents
|
||||
else digipot_current(2, tmp_motor_loud[2]);
|
||||
//st_current_init();
|
||||
if (SilentMode == 1) st_current_set(2, tmp_motor[2]); //set back to normal operation currents
|
||||
else st_current_set(2, tmp_motor_loud[2]);
|
||||
lcd_update_enable(true);
|
||||
lcd_return_to_status();
|
||||
max_feedrate[E_AXIS] = 50;
|
||||
|
@ -5705,7 +5706,7 @@ static void lcd_silent_mode_set_tune() {
|
|||
default: SilentModeMenu = 0; break;
|
||||
}
|
||||
eeprom_update_byte((unsigned char *)EEPROM_SILENT, SilentModeMenu);
|
||||
digipot_init();
|
||||
st_current_init();
|
||||
lcd_goto_menu(lcd_tune_menu, 9);
|
||||
}
|
||||
|
||||
|
@ -6103,14 +6104,15 @@ void lcd_sdcard_menu()
|
|||
}
|
||||
*/
|
||||
|
||||
|
||||
#ifdef TMC2130
|
||||
extern char conv[8];
|
||||
// Convert tmc2130 mres to string
|
||||
char *mres_to_str3(const uint8_t &x)
|
||||
{
|
||||
return itostr3(256 >> x);
|
||||
}
|
||||
|
||||
extern char conv[8];
|
||||
|
||||
menu_edit_type(uint8_t, mres, mres_to_str3, 1)
|
||||
// Convert tmc2130 wfac to string
|
||||
char *wfac_to_str5(const uint16_t &x)
|
||||
{
|
||||
|
@ -6125,9 +6127,9 @@ char *wfac_to_str5(const uint16_t &x)
|
|||
conv[8] = 0;
|
||||
return conv;
|
||||
}
|
||||
|
||||
menu_edit_type(uint16_t, wfac, wfac_to_str5, 1)
|
||||
menu_edit_type(uint8_t, mres, mres_to_str3, 1)
|
||||
#endif //TMC2130
|
||||
|
||||
menu_edit_type(uint8_t, byte3, itostr3, 1)
|
||||
menu_edit_type(int, int3, itostr3, 1)
|
||||
menu_edit_type(float, float3, ftostr3, 1)
|
||||
|
@ -6562,11 +6564,11 @@ static bool lcd_selfcheck_pulleys(int axis)
|
|||
for (i = 0; i < 5; i++) {
|
||||
refresh_cmd_timeout();
|
||||
current_position[axis] = current_position[axis] + move;
|
||||
digipot_current(0, 850); //set motor current higher
|
||||
st_current_set(0, 850); //set motor current higher
|
||||
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[3], 200, active_extruder);
|
||||
st_synchronize();
|
||||
if (SilentModeMenu == 1) digipot_current(0, tmp_motor[0]); //set back to normal operation currents
|
||||
else digipot_current(0, tmp_motor_loud[0]); //set motor current back
|
||||
if (SilentModeMenu == 1) st_current_set(0, tmp_motor[0]); //set back to normal operation currents
|
||||
else st_current_set(0, tmp_motor_loud[0]); //set motor current back
|
||||
current_position[axis] = current_position[axis] - move;
|
||||
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[3], 50, active_extruder);
|
||||
st_synchronize();
|
||||
|
@ -7391,22 +7393,7 @@ void lcd_update(uint8_t lcdDrawUpdateOverride)
|
|||
if (LCD_CLICKED) lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||
#endif//ULTIPANEL
|
||||
|
||||
#ifdef DOGLCD // Changes due to different driver architecture of the DOGM display
|
||||
blink++; // Variable for fan animation and alive dot
|
||||
u8g.firstPage();
|
||||
do
|
||||
{
|
||||
u8g.setFont(u8g_font_6x10_marlin);
|
||||
u8g.setPrintPos(125, 0);
|
||||
if (blink % 2) u8g.setColorIndex(1); else u8g.setColorIndex(0); // Set color for the alive dot
|
||||
u8g.drawPixel(127, 63); // draw alive dot
|
||||
u8g.setColorIndex(1); // black on white
|
||||
(*currentMenu)();
|
||||
if (!lcdDrawUpdate) break; // Terminate display update, when nothing new to draw. This must be done before the last dogm.next()
|
||||
} while (u8g.nextPage());
|
||||
#else
|
||||
(*currentMenu)();
|
||||
#endif
|
||||
|
||||
#ifdef LCD_HAS_STATUS_INDICATORS
|
||||
lcd_implementation_update_indicators();
|
||||
|
|
|
@ -1,131 +0,0 @@
|
|||
#ifndef ULCDST7920_H
|
||||
#define ULCDST7920_H
|
||||
|
||||
#include "Marlin.h"
|
||||
|
||||
#ifdef U8GLIB_ST7920
|
||||
|
||||
//set optimization so ARDUINO optimizes this file
|
||||
#pragma GCC optimize (3)
|
||||
|
||||
#define ST7920_CLK_PIN LCD_PINS_D4
|
||||
#define ST7920_DAT_PIN LCD_PINS_ENABLE
|
||||
#define ST7920_CS_PIN LCD_PINS_RS
|
||||
|
||||
//#define PAGE_HEIGHT 8 //128 byte framebuffer
|
||||
//#define PAGE_HEIGHT 16 //256 byte framebuffer
|
||||
#define PAGE_HEIGHT 32 //512 byte framebuffer
|
||||
|
||||
#define WIDTH 128
|
||||
#define HEIGHT 64
|
||||
|
||||
#include <U8glib.h>
|
||||
|
||||
static void ST7920_SWSPI_SND_8BIT(uint8_t val)
|
||||
{
|
||||
uint8_t i;
|
||||
for( i=0; i<8; i++ )
|
||||
{
|
||||
WRITE(ST7920_CLK_PIN,0);
|
||||
WRITE(ST7920_DAT_PIN,val&0x80);
|
||||
val<<=1;
|
||||
WRITE(ST7920_CLK_PIN,1);
|
||||
}
|
||||
}
|
||||
|
||||
#define ST7920_CS() {WRITE(ST7920_CS_PIN,1);u8g_10MicroDelay();}
|
||||
#define ST7920_NCS() {WRITE(ST7920_CS_PIN,0);}
|
||||
#define ST7920_SET_CMD() {ST7920_SWSPI_SND_8BIT(0xf8);u8g_10MicroDelay();}
|
||||
#define ST7920_SET_DAT() {ST7920_SWSPI_SND_8BIT(0xfa);u8g_10MicroDelay();}
|
||||
#define ST7920_WRITE_BYTE(a) {ST7920_SWSPI_SND_8BIT((a)&0xf0);ST7920_SWSPI_SND_8BIT((a)<<4);u8g_10MicroDelay();}
|
||||
#define ST7920_WRITE_BYTES(p,l) {uint8_t i;for(i=0;i<l;i++){ST7920_SWSPI_SND_8BIT(*p&0xf0);ST7920_SWSPI_SND_8BIT(*p<<4);p++;}u8g_10MicroDelay();}
|
||||
|
||||
uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg)
|
||||
{
|
||||
uint8_t i,y;
|
||||
switch(msg)
|
||||
{
|
||||
case U8G_DEV_MSG_INIT:
|
||||
{
|
||||
SET_OUTPUT(ST7920_CS_PIN);
|
||||
WRITE(ST7920_CS_PIN,0);
|
||||
SET_OUTPUT(ST7920_DAT_PIN);
|
||||
WRITE(ST7920_DAT_PIN,0);
|
||||
SET_OUTPUT(ST7920_CLK_PIN);
|
||||
WRITE(ST7920_CLK_PIN,1);
|
||||
|
||||
ST7920_CS();
|
||||
u8g_Delay(90); //initial delay for boot up
|
||||
ST7920_SET_CMD();
|
||||
ST7920_WRITE_BYTE(0x08); //display off, cursor+blink off
|
||||
ST7920_WRITE_BYTE(0x01); //clear CGRAM ram
|
||||
u8g_Delay(10); //delay for CGRAM clear
|
||||
ST7920_WRITE_BYTE(0x3E); //extended mode + GDRAM active
|
||||
for(y=0;y<HEIGHT/2;y++) //clear GDRAM
|
||||
{
|
||||
ST7920_WRITE_BYTE(0x80|y); //set y
|
||||
ST7920_WRITE_BYTE(0x80); //set x = 0
|
||||
ST7920_SET_DAT();
|
||||
for(i=0;i<2*WIDTH/8;i++) //2x width clears both segments
|
||||
ST7920_WRITE_BYTE(0);
|
||||
ST7920_SET_CMD();
|
||||
}
|
||||
ST7920_WRITE_BYTE(0x0C); //display on, cursor+blink off
|
||||
ST7920_NCS();
|
||||
}
|
||||
break;
|
||||
|
||||
case U8G_DEV_MSG_STOP:
|
||||
break;
|
||||
case U8G_DEV_MSG_PAGE_NEXT:
|
||||
{
|
||||
uint8_t *ptr;
|
||||
u8g_pb_t *pb = (u8g_pb_t *)(dev->dev_mem);
|
||||
y = pb->p.page_y0;
|
||||
ptr = (uint8_t*)pb->buf;
|
||||
|
||||
ST7920_CS();
|
||||
for( i = 0; i < PAGE_HEIGHT; i ++ )
|
||||
{
|
||||
ST7920_SET_CMD();
|
||||
if ( y < 32 )
|
||||
{
|
||||
ST7920_WRITE_BYTE(0x80 | y); //y
|
||||
ST7920_WRITE_BYTE(0x80); //x=0
|
||||
}
|
||||
else
|
||||
{
|
||||
ST7920_WRITE_BYTE(0x80 | (y-32)); //y
|
||||
ST7920_WRITE_BYTE(0x80 | 8); //x=64
|
||||
}
|
||||
|
||||
ST7920_SET_DAT();
|
||||
ST7920_WRITE_BYTES(ptr,WIDTH/8); //ptr is incremented inside of macro
|
||||
y++;
|
||||
}
|
||||
ST7920_NCS();
|
||||
}
|
||||
break;
|
||||
}
|
||||
#if PAGE_HEIGHT == 8
|
||||
return u8g_dev_pb8h1_base_fn(u8g, dev, msg, arg);
|
||||
#elif PAGE_HEIGHT == 16
|
||||
return u8g_dev_pb16h1_base_fn(u8g, dev, msg, arg);
|
||||
#else
|
||||
return u8g_dev_pb32h1_base_fn(u8g, dev, msg, arg);
|
||||
#endif
|
||||
}
|
||||
|
||||
uint8_t u8g_dev_st7920_128x64_rrd_buf[WIDTH*(PAGE_HEIGHT/8)] U8G_NOCOMMON;
|
||||
u8g_pb_t u8g_dev_st7920_128x64_rrd_pb = {{PAGE_HEIGHT,HEIGHT,0,0,0},WIDTH,u8g_dev_st7920_128x64_rrd_buf};
|
||||
u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = {u8g_dev_rrd_st7920_128x64_fn,&u8g_dev_st7920_128x64_rrd_pb,&u8g_com_null_fn};
|
||||
|
||||
class U8GLIB_ST7920_128X64_RRD : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_ST7920_128X64_RRD(uint8_t dummy) : U8GLIB(&u8g_dev_st7920_128x64_rrd_sw_spi) {}
|
||||
};
|
||||
|
||||
|
||||
#endif //U8GLIB_ST7920
|
||||
#endif //ULCDST7920_H
|
|
@ -462,6 +462,9 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
|
|||
#define PING_TIME_LONG 600 //10 min; used when length of commands buffer > 0 to avoid false triggering when dealing with long gcodes
|
||||
#define PING_ALLERT_PERIOD 60 //time in s
|
||||
|
||||
#define NC_TIME 10 //time in s for periodic important status messages sending which needs reponse from monitoring
|
||||
#define NC_BUTTON_LONG_PRESS 15 //time in s
|
||||
|
||||
#define LONG_PRESS_TIME 1000 //time in ms for button long press
|
||||
#define BUTTON_BLANKING_TIME 200 //time in ms for blanking after button release
|
||||
|
||||
|
|
|
@ -107,6 +107,9 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
|
|||
// New XYZ calibration
|
||||
#define NEW_XYZCAL
|
||||
|
||||
// Do not use Arduino SPI
|
||||
#define NEW_SPI
|
||||
|
||||
// Watchdog support
|
||||
#define WATCHDOG
|
||||
|
||||
|
@ -574,6 +577,9 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
|
|||
#define PING_TIME_LONG 600 //10 min; used when length of commands buffer > 0 to avoid false triggering when dealing with long gcodes
|
||||
#define PING_ALLERT_PERIOD 60 //time in s
|
||||
|
||||
#define NC_TIME 10 //time in s for periodic important status messages sending which needs reponse from monitoring
|
||||
#define NC_BUTTON_LONG_PRESS 15 //time in s
|
||||
|
||||
#define LONG_PRESS_TIME 1000 //time in ms for button long press
|
||||
#define BUTTON_BLANKING_TIME 200 //time in ms for blanking after button release
|
||||
|
||||
|
|
Loading…
Reference in a new issue