Bump
This commit is contained in:
@@ -53,9 +53,9 @@ void spiBegin(void) {
|
||||
|
||||
#if NONE(SOFTWARE_SPI, FORCE_SOFT_SPI)
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ------------------------
|
||||
// Hardware SPI
|
||||
//------------------------------------------------------------------------------
|
||||
// ------------------------
|
||||
|
||||
// make sure SPCR rate is in expected bits
|
||||
#if (SPR0 != 0 || SPR1 != 1)
|
||||
@@ -177,9 +177,9 @@ void spiBegin(void) {
|
||||
|
||||
#else // SOFTWARE_SPI || FORCE_SOFT_SPI
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ------------------------
|
||||
// Software SPI
|
||||
//------------------------------------------------------------------------------
|
||||
// ------------------------
|
||||
|
||||
// nop to tune soft SPI timing
|
||||
#define nop asm volatile ("\tnop\n")
|
||||
|
||||
@@ -50,9 +50,9 @@
|
||||
|
||||
static volatile int8_t Channel[_Nbr_16timers]; // counter for the servo being pulsed for each timer (or -1 if refresh interval)
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ------------------------
|
||||
/// Interrupt handler for the TC0 channel 1.
|
||||
//------------------------------------------------------------------------------
|
||||
// ------------------------
|
||||
void Servo_Handler(timer16_Sequence_t timer, Tc *pTc, uint8_t channel);
|
||||
|
||||
#ifdef _useTimer1
|
||||
@@ -137,7 +137,7 @@ void initISR(timer16_Sequence_t timer) {
|
||||
#endif
|
||||
}
|
||||
|
||||
void finISR(timer16_Sequence_t timer) {
|
||||
void finISR(timer16_Sequence_t) {
|
||||
#ifdef _useTimer1
|
||||
TC_Stop(TC_FOR_TIMER1, CHANNEL_FOR_TIMER1);
|
||||
#endif
|
||||
|
||||
@@ -62,7 +62,6 @@
|
||||
|
||||
#define digitalRead_mod(p) extDigitalRead(p) // AVR digitalRead disabled PWM before it read the pin
|
||||
#define PRINT_PORT(p)
|
||||
#define NAME_FORMAT(p) PSTR("%-##p##s")
|
||||
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%02d"), p); SERIAL_ECHO(buffer); }while(0)
|
||||
#define GET_ARRAY_PIN(p) pin_array[p].pin
|
||||
|
||||
@@ -458,7 +458,7 @@ void udi_cdc_data_sof_notify(void)
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// ------------------------
|
||||
//------- Internal routines to control serial line
|
||||
|
||||
static uint8_t udi_cdc_setup_to_port(void)
|
||||
@@ -579,7 +579,7 @@ static void udi_cdc_serial_state_msg_sent(udd_ep_status_t status, iram_size_t n,
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// ------------------------
|
||||
//------- Internal routines to process data transfer
|
||||
|
||||
|
||||
@@ -781,7 +781,7 @@ static void udi_cdc_tx_send(uint8_t port)
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------
|
||||
// ------------------------
|
||||
//------- Application interface
|
||||
|
||||
|
||||
|
||||
@@ -457,7 +457,7 @@ uint8_t udi_msc_getsetting(void)
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------
|
||||
// ------------------------
|
||||
//------- Routines to process CBW packet
|
||||
|
||||
static void udi_msc_cbw_invalid(void)
|
||||
@@ -613,7 +613,7 @@ static bool udi_msc_cbw_validate(uint32_t alloc_len, uint8_t dir_flag)
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------
|
||||
// ------------------------
|
||||
//------- Routines to process small data packet
|
||||
|
||||
static void udi_msc_data_send(uint8_t * buffer, uint8_t buf_size)
|
||||
@@ -645,7 +645,7 @@ static void udi_msc_data_sent(udd_ep_status_t status, iram_size_t nb_sent,
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------
|
||||
// ------------------------
|
||||
//------- Routines to process CSW packet
|
||||
|
||||
static void udi_msc_csw_process(void)
|
||||
@@ -691,7 +691,7 @@ static void udi_msc_csw_sent(udd_ep_status_t status, iram_size_t nb_sent,
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------
|
||||
// ------------------------
|
||||
//------- Routines manage sense data
|
||||
|
||||
static void udi_msc_clear_sense(void)
|
||||
@@ -757,7 +757,7 @@ static void udi_msc_sense_command_invalid(void)
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------
|
||||
// ------------------------
|
||||
//------- Routines manage SCSI Commands
|
||||
|
||||
static void udi_msc_spc_requestsense(void)
|
||||
|
||||
@@ -506,7 +506,7 @@ static bool udd_ep_interrupt(void);
|
||||
//@}
|
||||
|
||||
|
||||
//--------------------------------------------------------
|
||||
// ------------------------
|
||||
//--- INTERNAL ROUTINES TO MANAGED GLOBAL EVENTS
|
||||
|
||||
/**
|
||||
@@ -1307,7 +1307,7 @@ void udd_test_mode_packet(void)
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------
|
||||
// ------------------------
|
||||
//--- INTERNAL ROUTINES TO MANAGED THE CONTROL ENDPOINT
|
||||
|
||||
static void udd_reset_ep_ctrl(void)
|
||||
@@ -1729,7 +1729,7 @@ static bool udd_ctrl_interrupt(void)
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------
|
||||
// ------------------------
|
||||
//--- INTERNAL ROUTINES TO MANAGED THE BULK/INTERRUPT/ISOCHRONOUS ENDPOINTS
|
||||
|
||||
#if (0 != USB_DEVICE_MAX_EP)
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#endif
|
||||
|
||||
// ------------------------
|
||||
// Externals
|
||||
// Externs
|
||||
// ------------------------
|
||||
|
||||
portMUX_TYPE spinlock = portMUX_INITIALIZER_UNLOCKED;
|
||||
@@ -177,6 +177,7 @@ void HAL_adc_init() {
|
||||
// Calculate ADC characteristics (i.e., gain and offset factors for each attenuation level)
|
||||
for (int i = 0; i < ADC_ATTEN_MAX; i++) {
|
||||
esp_adc_cal_characterize(ADC_UNIT_1, (adc_atten_t)i, ADC_WIDTH_BIT_12, V_REF, &characteristics[i]);
|
||||
|
||||
// Change attenuation 100mV below the calibrated threshold
|
||||
thresholds[i] = esp_adc_cal_raw_to_voltage(4095, &characteristics[i]);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#define digitalRead_mod(p) digitalRead(p)
|
||||
#define PRINT_PORT(p)
|
||||
#define GET_ARRAY_PIN(p) pin_array[p].pin
|
||||
#define NAME_FORMAT(p) PSTR("%-##p##s")
|
||||
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0)
|
||||
#define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#if HAS_GRAPHICAL_LCD && ENABLED(SDSUPPORT) && (LCD_PINS_D4 == SCK_PIN || LCD_PINS_ENABLE == MOSI_PIN || DOGLCD_SCK == SCK_PIN || DOGLCD_MOSI == MOSI_PIN)
|
||||
#define LPC_SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
|
||||
// needed due to the speed and mode requred for communicating with each device being different.
|
||||
// needed due to the speed and mode required for communicating with each device being different.
|
||||
// This requirement can be removed if the SPI access to these devices is updated to use
|
||||
// spiBeginTransaction.
|
||||
#endif
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#define digitalRead_mod(p) extDigitalRead(p)
|
||||
#define PRINT_PORT(p)
|
||||
#define GET_ARRAY_PIN(p) pin_array[p].pin
|
||||
#define NAME_FORMAT(p) PSTR("%-##p##s")
|
||||
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%d.%02d"), LPC1768_PIN_PORT(p), LPC1768_PIN_PIN(p)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#if ENABLED(SDSUPPORT) && HAS_GRAPHICAL_LCD && (LCD_PINS_D4 == SCK_PIN || LCD_PINS_ENABLE == MOSI_PIN || DOGLCD_SCK == SCK_PIN || DOGLCD_MOSI == MOSI_PIN)
|
||||
#define LPC_SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
|
||||
// needed due to the speed and mode requred for communicating with each device being different.
|
||||
// needed due to the speed and mode required for communicating with each device being different.
|
||||
// This requirement can be removed if the SPI access to these devices is updated to use
|
||||
// spiBeginTransaction.
|
||||
#endif
|
||||
|
||||
@@ -42,7 +42,6 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS];
|
||||
#define GET_ARRAY_PIN(p) pin_t(pin_array[p].pin)
|
||||
#define pwm_status(pin) PWM_PIN(pin)
|
||||
#define digitalRead_mod(p) extDigitalRead(p)
|
||||
#define NAME_FORMAT(p) PSTR("%-##p##s")
|
||||
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3hd "), int16_t(p)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_PORT(p) print_port(p)
|
||||
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
|
||||
@@ -107,7 +107,6 @@ const XrefInfo pin_xref[] PROGMEM = {
|
||||
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
|
||||
#define VALID_PIN(ANUM) ((ANUM) >= 0 && (ANUM) < NUMBER_PINS_TOTAL)
|
||||
#define digitalRead_mod(Ard_num) extDigitalRead(Ard_num) // must use Arduino pin numbers when doing reads
|
||||
#define NAME_FORMAT(p) PSTR("%-##p##s")
|
||||
#define PRINT_PIN(Q)
|
||||
#define PRINT_PORT(ANUM) port_print(ANUM)
|
||||
#define DIGITAL_PIN_TO_ANALOG_PIN(ANUM) -1 // will report analog pin number in the print port routine
|
||||
|
||||
@@ -201,6 +201,11 @@ void HAL_init(void) {
|
||||
#if PIN_EXISTS(LED)
|
||||
OUT_WRITE(LED_PIN, LOW);
|
||||
#endif
|
||||
#if PIN_EXISTS(USB_CONNECT)
|
||||
OUT_WRITE(USB_CONNECT_PIN, !USB_CONNECT_INVERTING); // USB clear connection
|
||||
delay(1000); // Give OS time to notice
|
||||
OUT_WRITE(USB_CONNECT_PIN, USB_CONNECT_INVERTING);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* VGPV Done with defines
|
||||
@@ -260,7 +265,11 @@ extern "C" {
|
||||
void HAL_adc_init(void) {
|
||||
// configure the ADC
|
||||
adc.calibrate();
|
||||
adc.setSampleRate(ADC_SMPR_41_5); // ?
|
||||
#if F_CPU > 72000000
|
||||
adc.setSampleRate(ADC_SMPR_71_5); // 71.5 ADC cycles
|
||||
#else
|
||||
adc.setSampleRate(ADC_SMPR_41_5); // 41.5 ADC cycles
|
||||
#endif
|
||||
adc.setPins(adc_pins, ADC_PIN_COUNT);
|
||||
adc.setDMA(HAL_adc_results, (uint16_t)ADC_PIN_COUNT, (uint32_t)(DMA_MINC_MODE | DMA_CIRC_MODE), nullptr);
|
||||
adc.setScanMode();
|
||||
|
||||
@@ -79,15 +79,25 @@ void spiBegin() {
|
||||
* @details
|
||||
*/
|
||||
void spiInit(uint8_t spiRate) {
|
||||
/**
|
||||
* STM32F1 APB2 = 72MHz, APB1 = 36MHz, max SPI speed of this MCU if 18Mhz
|
||||
* STM32F1 has 3 SPI ports, SPI1 in APB2, SPI2/SPI3 in APB1
|
||||
* so the minimum prescale of SPI1 is DIV4, SPI2/SPI3 is DIV2
|
||||
*/
|
||||
#if SPI_DEVICE == 1
|
||||
#define SPI_CLOCK_MAX SPI_CLOCK_DIV4
|
||||
#else
|
||||
#define SPI_CLOCK_MAX SPI_CLOCK_DIV2
|
||||
#endif
|
||||
uint8_t clock;
|
||||
switch (spiRate) {
|
||||
case SPI_FULL_SPEED: clock = SPI_CLOCK_DIV2 ; break;
|
||||
case SPI_FULL_SPEED: clock = SPI_CLOCK_MAX ; break;
|
||||
case SPI_HALF_SPEED: clock = SPI_CLOCK_DIV4 ; break;
|
||||
case SPI_QUARTER_SPEED: clock = SPI_CLOCK_DIV8 ; break;
|
||||
case SPI_EIGHTH_SPEED: clock = SPI_CLOCK_DIV16; break;
|
||||
case SPI_SPEED_5: clock = SPI_CLOCK_DIV32; break;
|
||||
case SPI_SPEED_6: clock = SPI_CLOCK_DIV64; break;
|
||||
default: clock = SPI_CLOCK_DIV2; // Default from the SPI library
|
||||
default: clock = SPI_CLOCK_DIV2; // Default from the SPI library
|
||||
}
|
||||
SPI.setModule(SPI_DEVICE);
|
||||
SPI.begin();
|
||||
@@ -104,7 +114,7 @@ void spiInit(uint8_t spiRate) {
|
||||
* @details
|
||||
*/
|
||||
uint8_t spiRec(void) {
|
||||
uint8_t returnByte = SPI.transfer(0xFF);
|
||||
uint8_t returnByte = SPI.transfer(ff);
|
||||
return returnByte;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import sys
|
||||
#dynamic build flags for generic compile options
|
||||
if __name__ == "__main__":
|
||||
args = " ".join([ "-std=gnu11",
|
||||
"-std=gnu++11",
|
||||
"-Os",
|
||||
"-mcpu=cortex-m3",
|
||||
"-mthumb",
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#undef M_PI // Redefined by all
|
||||
#undef _BV // Redefined by some
|
||||
#undef sq // Redefined by teensy3/wiring.h
|
||||
#undef vsnprintf_P // Defined by avr/pgmspace.h in some platforms
|
||||
|
||||
#include <Arduino.h> // NOTE: If included earlier then this line is a NOOP
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
// NOTE: IF YOU CHANGE LANGUAGE FILES OR MERGE A FILE WITH CHANGES
|
||||
//
|
||||
// ==> ALWAYS TRY TO COMPILE MARLIN WITH/WITHOUT "ULTIPANEL" / "ULTRALCD" / "SDSUPPORT" #define IN "Configuration.h"
|
||||
// ==> ALWAYS TRY TO COMPILE MARLIN WITH/WITHOUT "ULTIPANEL" / "ULTRA_LCD" / "SDSUPPORT" #define IN "Configuration.h"
|
||||
// ==> ALSO TRY ALL AVAILABLE LANGUAGE OPTIONS
|
||||
// See also http://marlinfw.org/docs/development/lcd_language.html
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../HAL/HAL.h"
|
||||
#include "../inc/MarlinConfig.h"
|
||||
|
||||
/**
|
||||
* Define debug bit-masks
|
||||
|
||||
@@ -48,6 +48,28 @@
|
||||
#include "../Marlin.h"
|
||||
#include "../HAL/shared/Delay.h"
|
||||
|
||||
#define HAS_SIDE_BY_SIDE (ENABLED(MAX7219_SIDE_BY_SIDE) && MAX7219_NUMBER_UNITS > 1)
|
||||
|
||||
#if _ROT == 0 || _ROT == 180
|
||||
#if HAS_SIDE_BY_SIDE
|
||||
#define MAX7219_X_LEDS 8
|
||||
#define MAX7219_Y_LEDS MAX7219_LINES
|
||||
#else
|
||||
#define MAX7219_Y_LEDS 8
|
||||
#define MAX7219_X_LEDS MAX7219_LINES
|
||||
#endif
|
||||
#elif _ROT == 90 || _ROT == 270
|
||||
#if HAS_SIDE_BY_SIDE
|
||||
#define MAX7219_Y_LEDS 8
|
||||
#define MAX7219_X_LEDS MAX7219_LINES
|
||||
#else
|
||||
#define MAX7219_X_LEDS 8
|
||||
#define MAX7219_Y_LEDS MAX7219_LINES
|
||||
#endif
|
||||
#else
|
||||
#error "MAX7219_ROTATE must be a multiple of +/- 90°."
|
||||
#endif
|
||||
|
||||
Max7219 max7219;
|
||||
|
||||
uint8_t Max7219::led_line[MAX7219_LINES]; // = { 0 };
|
||||
@@ -59,25 +81,41 @@ uint8_t Max7219::led_line[MAX7219_LINES]; // = { 0 };
|
||||
#else
|
||||
#define _LED_BIT(Q) ((Q) & 0x7)
|
||||
#endif
|
||||
|
||||
#if (_ROT == 0 || _ROT == 270) == ENABLED(MAX7219_REVERSE_ORDER)
|
||||
#define _LED_UNIT(Q) ((MAX7219_NUMBER_UNITS - 1 - ((Q) >> 3)) << 3)
|
||||
#else
|
||||
#define _LED_UNIT(Q) ((Q) & ~0x7)
|
||||
#endif
|
||||
|
||||
#if _ROT < 180
|
||||
#define _LED_IND(P,Q) (_LED_UNIT(P) + (Q))
|
||||
#else
|
||||
#define _LED_IND(P,Q) (_LED_UNIT(P) + (7 - ((Q) & 0x7)))
|
||||
#endif
|
||||
#if _ROT == 0 || _ROT == 180
|
||||
#define LED_IND(X,Y) _LED_IND(X,Y)
|
||||
#define LED_BIT(X,Y) _LED_BIT(X)
|
||||
#elif _ROT == 90 || _ROT == 270
|
||||
#define LED_IND(X,Y) _LED_IND(Y,X)
|
||||
#else
|
||||
#define LED_BIT(X,Y) _LED_BIT(Y)
|
||||
#endif
|
||||
#if _ROT == 0 || _ROT == 90
|
||||
#define _LED_IND(P,Q) (_LED_TOP(P) + ((Q) & 0x7))
|
||||
#else
|
||||
#define _LED_IND(P,Q) (_LED_TOP(P) + (7 - ((Q) & 0x7)))
|
||||
#endif
|
||||
|
||||
#if HAS_SIDE_BY_SIDE
|
||||
#if (_ROT == 0 || _ROT == 90) == DISABLED(MAX7219_REVERSE_ORDER)
|
||||
#define _LED_TOP(Q) ((MAX7219_NUMBER_UNITS - 1 - ((Q) >> 3)) << 3)
|
||||
#else
|
||||
#define _LED_TOP(Q) ((Q) & ~0x7)
|
||||
#endif
|
||||
#if _ROT == 0 || _ROT == 180
|
||||
#define LED_IND(X,Y) _LED_IND(Y,Y)
|
||||
#elif _ROT == 90 || _ROT == 270
|
||||
#define LED_IND(X,Y) _LED_IND(X,X)
|
||||
#endif
|
||||
#else
|
||||
#if (_ROT == 0 || _ROT == 270) == DISABLED(MAX7219_REVERSE_ORDER)
|
||||
#define _LED_TOP(Q) ((Q) & ~0x7)
|
||||
#else
|
||||
#define _LED_TOP(Q) ((MAX7219_NUMBER_UNITS - 1 - ((Q) >> 3)) << 3)
|
||||
#endif
|
||||
#if _ROT == 0 || _ROT == 180
|
||||
#define LED_IND(X,Y) _LED_IND(X,Y)
|
||||
#elif _ROT == 90 || _ROT == 270
|
||||
#define LED_IND(X,Y) _LED_IND(Y,X)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define XOR_7219(X,Y) do{ led_line[LED_IND(X,Y)] ^= _BV(LED_BIT(X,Y)); }while(0)
|
||||
#define SET_7219(X,Y) do{ led_line[LED_IND(X,Y)] |= _BV(LED_BIT(X,Y)); }while(0)
|
||||
#define CLR_7219(X,Y) do{ led_line[LED_IND(X,Y)] &= ~_BV(LED_BIT(X,Y)); }while(0)
|
||||
@@ -172,23 +210,31 @@ void Max7219::send(const uint8_t reg, const uint8_t data) {
|
||||
CRITICAL_SECTION_END;
|
||||
}
|
||||
|
||||
// Send out a single native row of bits to all units
|
||||
void Max7219::refresh_line(const uint8_t line) {
|
||||
for (uint8_t u = MAX7219_NUMBER_UNITS; u--;)
|
||||
send(LINE_REG(line), led_line[(u << 3) | (line & 0x7)]);
|
||||
// Send out a single native row of bits to just one unit
|
||||
void Max7219::refresh_unit_line(const uint8_t line) {
|
||||
#if MAX7219_NUMBER_UNITS == 1
|
||||
send(LINE_REG(line), led_line[line]);
|
||||
#else
|
||||
for (uint8_t u = MAX7219_NUMBER_UNITS; u--;)
|
||||
if (u == (line >> 3)) send(LINE_REG(line), led_line[line]); else noop();
|
||||
#endif
|
||||
pulse_load();
|
||||
}
|
||||
|
||||
// Send out a single native row of bits to just one unit
|
||||
void Max7219::refresh_unit_line(const uint8_t line) {
|
||||
for (uint8_t u = MAX7219_NUMBER_UNITS; u--;)
|
||||
if (u == (line >> 3)) send(LINE_REG(line), led_line[line]); else noop();
|
||||
// Send out a single native row of bits to all units
|
||||
void Max7219::refresh_line(const uint8_t line) {
|
||||
#if MAX7219_NUMBER_UNITS == 1
|
||||
refresh_unit_line(line);
|
||||
#else
|
||||
for (uint8_t u = MAX7219_NUMBER_UNITS; u--;)
|
||||
send(LINE_REG(line), led_line[(u << 3) | (line & 0x7)]);
|
||||
#endif
|
||||
pulse_load();
|
||||
}
|
||||
|
||||
void Max7219::set(const uint8_t line, const uint8_t bits) {
|
||||
led_line[line] = bits;
|
||||
refresh_line(line);
|
||||
refresh_unit_line(line);
|
||||
}
|
||||
|
||||
#if ENABLED(MAX7219_NUMERIC)
|
||||
@@ -227,42 +273,50 @@ void Max7219::set(const uint8_t line, const uint8_t bits) {
|
||||
|
||||
// Modify a single LED bit and send the changed line
|
||||
void Max7219::led_set(const uint8_t x, const uint8_t y, const bool on) {
|
||||
if (x > MAX7219_X_LEDS - 1 || y > MAX7219_Y_LEDS - 1) return error(PSTR("led_set"), x, y);
|
||||
if (x >= MAX7219_X_LEDS || y >= MAX7219_Y_LEDS) return error(PSTR("led_set"), x, y);
|
||||
if (BIT_7219(x, y) == on) return;
|
||||
XOR_7219(x, y);
|
||||
refresh_line(LED_IND(x, y));
|
||||
refresh_unit_line(LED_IND(x, y));
|
||||
}
|
||||
|
||||
void Max7219::led_on(const uint8_t x, const uint8_t y) {
|
||||
if (x > MAX7219_X_LEDS - 1 || y > MAX7219_Y_LEDS - 1) return error(PSTR("led_on"), x, y);
|
||||
if (x >= MAX7219_X_LEDS || y >= MAX7219_Y_LEDS) return error(PSTR("led_on"), x, y);
|
||||
led_set(x, y, true);
|
||||
}
|
||||
|
||||
void Max7219::led_off(const uint8_t x, const uint8_t y) {
|
||||
if (x > MAX7219_X_LEDS - 1 || y > MAX7219_Y_LEDS - 1) return error(PSTR("led_off"), x, y);
|
||||
if (x >= MAX7219_X_LEDS || y >= MAX7219_Y_LEDS) return error(PSTR("led_off"), x, y);
|
||||
led_set(x, y, false);
|
||||
}
|
||||
|
||||
void Max7219::led_toggle(const uint8_t x, const uint8_t y) {
|
||||
if (x > MAX7219_X_LEDS - 1 || y > MAX7219_Y_LEDS - 1) return error(PSTR("led_toggle"), x, y);
|
||||
if (x >= MAX7219_X_LEDS || y >= MAX7219_Y_LEDS) return error(PSTR("led_toggle"), x, y);
|
||||
led_set(x, y, !BIT_7219(x, y));
|
||||
}
|
||||
|
||||
void Max7219::send_row(const uint8_t row) {
|
||||
#if _ROT == 0 || _ROT == 180
|
||||
refresh_line(LED_IND(0, row));
|
||||
#else
|
||||
#if _ROT == 0 || _ROT == 180 // Native Lines are horizontal too
|
||||
#if MAX7219_X_LEDS <= 8
|
||||
refresh_unit_line(LED_IND(0, row)); // A single unit line
|
||||
#else
|
||||
refresh_line(LED_IND(0, row)); // Same line, all units
|
||||
#endif
|
||||
#else // Native lines are vertical
|
||||
UNUSED(row);
|
||||
refresh();
|
||||
refresh(); // Actually a column
|
||||
#endif
|
||||
}
|
||||
|
||||
void Max7219::send_column(const uint8_t col) {
|
||||
#if _ROT == 90 || _ROT == 270
|
||||
refresh_line(LED_IND(col, 0));
|
||||
#else
|
||||
#if _ROT == 90 || _ROT == 270 // Native Lines are vertical too
|
||||
#if MAX7219_Y_LEDS <= 8
|
||||
refresh_unit_line(LED_IND(col, 0)); // A single unit line
|
||||
#else
|
||||
refresh_line(LED_IND(col, 0)); // Same line, all units
|
||||
#endif
|
||||
#else // Native lines are horizontal
|
||||
UNUSED(col);
|
||||
refresh();
|
||||
refresh(); // Actually a row
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -378,24 +432,24 @@ void Max7219::set_columns_32bits(const uint8_t x, uint32_t val) {
|
||||
void Max7219::register_setup() {
|
||||
for (uint8_t i = 0; i < MAX7219_NUMBER_UNITS; i++)
|
||||
send(max7219_reg_scanLimit, 0x07);
|
||||
pulse_load(); // tell the chips to load the clocked out data
|
||||
pulse_load(); // Tell the chips to load the clocked out data
|
||||
|
||||
for (uint8_t i = 0; i < MAX7219_NUMBER_UNITS; i++)
|
||||
send(max7219_reg_decodeMode, 0x00); // using an led matrix (not digits)
|
||||
pulse_load(); // tell the chips to load the clocked out data
|
||||
send(max7219_reg_decodeMode, 0x00); // Using an led matrix (not digits)
|
||||
pulse_load(); // Tell the chips to load the clocked out data
|
||||
|
||||
for (uint8_t i = 0; i < MAX7219_NUMBER_UNITS; i++)
|
||||
send(max7219_reg_shutdown, 0x01); // not in shutdown mode
|
||||
pulse_load(); // tell the chips to load the clocked out data
|
||||
send(max7219_reg_shutdown, 0x01); // Not in shutdown mode
|
||||
pulse_load(); // Tell the chips to load the clocked out data
|
||||
|
||||
for (uint8_t i = 0; i < MAX7219_NUMBER_UNITS; i++)
|
||||
send(max7219_reg_displayTest, 0x00); // no display test
|
||||
pulse_load(); // tell the chips to load the clocked out data
|
||||
send(max7219_reg_displayTest, 0x00); // No display test
|
||||
pulse_load(); // Tell the chips to load the clocked out data
|
||||
|
||||
for (uint8_t i = 0; i < MAX7219_NUMBER_UNITS; i++)
|
||||
send(max7219_reg_intensity, 0x01 & 0x0F); // the first 0x0F is the value you can set
|
||||
// range: 0x00 to 0x0F
|
||||
pulse_load(); // tell the chips to load the clocked out data
|
||||
send(max7219_reg_intensity, 0x01 & 0x0F); // The first 0x0F is the value you can set
|
||||
// Range: 0x00 to 0x0F
|
||||
pulse_load(); // Tell the chips to load the clocked out data
|
||||
}
|
||||
|
||||
#ifdef MAX7219_INIT_TEST
|
||||
@@ -408,7 +462,7 @@ void Max7219::register_setup() {
|
||||
led_set(px, py, on);
|
||||
delay(del);
|
||||
const int8_t x = px + way[dir], y = py + way[dir + 1];
|
||||
if (!WITHIN(x, 0, MAX7219_X_LEDS-1) || !WITHIN(y, 0, MAX7219_Y_LEDS-1) || BIT_7219(x, y) == on) dir = (dir + 2) & 0x7;
|
||||
if (!WITHIN(x, 0, MAX7219_X_LEDS - 1) || !WITHIN(y, 0, MAX7219_Y_LEDS - 1) || BIT_7219(x, y) == on) dir = (dir + 2) & 0x7;
|
||||
px += way[dir]; py += way[dir + 1];
|
||||
}
|
||||
}
|
||||
@@ -416,7 +470,7 @@ void Max7219::register_setup() {
|
||||
#else
|
||||
|
||||
void Max7219::sweep(const int8_t dir, const uint16_t ms, const bool on) {
|
||||
uint8_t x = dir > 0 ? 0 : MAX7219_X_LEDS-1;
|
||||
uint8_t x = dir > 0 ? 0 : MAX7219_X_LEDS - 1;
|
||||
for (uint8_t i = MAX7219_X_LEDS; i--; x += dir) {
|
||||
set_column(x, on ? 0xFFFFFFFF : 0x00000000);
|
||||
delay(ms);
|
||||
@@ -434,10 +488,10 @@ void Max7219::init() {
|
||||
|
||||
register_setup();
|
||||
|
||||
for (uint8_t i = 0; i <= 7; i++) { // Empty registers to turn all LEDs off
|
||||
for (uint8_t i = 0; i <= 7; i++) { // Empty registers to turn all LEDs off
|
||||
led_line[i] = 0x00;
|
||||
send(max7219_reg_digit0 + i, 0);
|
||||
pulse_load(); // tell the chips to load the clocked out data
|
||||
pulse_load(); // Tell the chips to load the clocked out data
|
||||
}
|
||||
|
||||
#ifdef MAX7219_INIT_TEST
|
||||
@@ -464,55 +518,52 @@ void Max7219::init() {
|
||||
*/
|
||||
|
||||
// Apply changes to update a marker
|
||||
void Max7219::mark16(const uint8_t y, const uint8_t v1, const uint8_t v2) {
|
||||
#if MAX7219_X_LEDS == 8
|
||||
#if MAX7219_Y_LEDS == 8
|
||||
led_off(v1 & 0x7, y + (v1 >= 8));
|
||||
led_on(v2 & 0x7, y + (v2 >= 8));
|
||||
#else
|
||||
led_off(y, v1 & 0xF); // At least 16 LEDs down. Use a single column.
|
||||
led_on(y, v2 & 0xF);
|
||||
#endif
|
||||
#else
|
||||
led_off(v1 & 0xF, y); // At least 16 LEDs across. Use a single row.
|
||||
led_on(v2 & 0xF, y);
|
||||
void Max7219::mark16(const uint8_t pos, const uint8_t v1, const uint8_t v2) {
|
||||
#if MAX7219_X_LEDS > 8 // At least 16 LEDs on the X-Axis. Use single line.
|
||||
led_off(v1 & 0xF, pos);
|
||||
led_on(v2 & 0xF, pos);
|
||||
#elif MAX7219_Y_LEDS > 8 // At least 16 LEDs on the Y-Axis. Use a single column.
|
||||
led_off(pos, v1 & 0xF);
|
||||
led_on(pos, v2 & 0xF);
|
||||
#else // Single 8x8 LED matrix. Use two lines to get 16 LEDs.
|
||||
led_off(v1 & 0x7, pos + (v1 >= 8));
|
||||
led_on(v2 & 0x7, pos + (v2 >= 8));
|
||||
#endif
|
||||
}
|
||||
|
||||
// Apply changes to update a tail-to-head range
|
||||
void Max7219::range16(const uint8_t y, const uint8_t ot, const uint8_t nt, const uint8_t oh, const uint8_t nh) {
|
||||
#if MAX7219_X_LEDS == 8
|
||||
#if MAX7219_Y_LEDS == 8
|
||||
if (ot != nt) for (uint8_t n = ot & 0xF; n != (nt & 0xF) && n != (nh & 0xF); n = (n + 1) & 0xF)
|
||||
led_off(n & 0x7, y + (n >= 8));
|
||||
if (oh != nh) for (uint8_t n = (oh + 1) & 0xF; n != ((nh + 1) & 0xF); n = (n + 1) & 0xF)
|
||||
led_on(n & 0x7, y + (n >= 8));
|
||||
#else // The Max7219 Y-Axis has at least 16 LED's. So use a single column
|
||||
if (ot != nt) for (uint8_t n = ot & 0xF; n != (nt & 0xF) && n != (nh & 0xF); n = (n + 1) & 0xF)
|
||||
led_off(y, n & 0xF);
|
||||
if (oh != nh) for (uint8_t n = (oh + 1) & 0xF; n != ((nh + 1) & 0xF); n = (n + 1) & 0xF)
|
||||
led_on(y, n & 0xF);
|
||||
#endif
|
||||
#else // LED matrix has at least 16 LED's on the X-Axis. Use single line of LED's
|
||||
#if MAX7219_X_LEDS > 8 // At least 16 LEDs on the X-Axis. Use single line.
|
||||
if (ot != nt) for (uint8_t n = ot & 0xF; n != (nt & 0xF) && n != (nh & 0xF); n = (n + 1) & 0xF)
|
||||
led_off(n & 0xF, y);
|
||||
if (oh != nh) for (uint8_t n = (oh + 1) & 0xF; n != ((nh + 1) & 0xF); n = (n + 1) & 0xF)
|
||||
led_on(n & 0xF, y);
|
||||
#endif
|
||||
#elif MAX7219_Y_LEDS > 8 // At least 16 LEDs on the Y-Axis. Use a single column.
|
||||
if (ot != nt) for (uint8_t n = ot & 0xF; n != (nt & 0xF) && n != (nh & 0xF); n = (n + 1) & 0xF)
|
||||
led_off(y, n & 0xF);
|
||||
if (oh != nh) for (uint8_t n = (oh + 1) & 0xF; n != ((nh + 1) & 0xF); n = (n + 1) & 0xF)
|
||||
led_on(y, n & 0xF);
|
||||
#else // Single 8x8 LED matrix. Use two lines to get 16 LEDs.
|
||||
if (ot != nt) for (uint8_t n = ot & 0xF; n != (nt & 0xF) && n != (nh & 0xF); n = (n + 1) & 0xF)
|
||||
led_off(n & 0x7, y + (n >= 8));
|
||||
if (oh != nh) for (uint8_t n = (oh + 1) & 0xF; n != ((nh + 1) & 0xF); n = (n + 1) & 0xF)
|
||||
led_on(n & 0x7, y + (n >= 8));
|
||||
#endif
|
||||
}
|
||||
|
||||
// Apply changes to update a quantity
|
||||
void Max7219::quantity16(const uint8_t y, const uint8_t ov, const uint8_t nv) {
|
||||
void Max7219::quantity16(const uint8_t pos, const uint8_t ov, const uint8_t nv) {
|
||||
for (uint8_t i = _MIN(nv, ov); i < _MAX(nv, ov); i++)
|
||||
#if MAX7219_X_LEDS == 8
|
||||
#if MAX7219_Y_LEDS == 8
|
||||
led_set(i >> 1, y + (i & 1), nv >= ov); // single 8x8 LED matrix. Use two lines to get 16 LED's
|
||||
#else
|
||||
led_set(y, i, nv >= ov); // The Max7219 Y-Axis has at least 16 LED's. So use a single column
|
||||
led_set(
|
||||
#if MAX7219_X_LEDS > 8 // At least 16 LEDs on the X-Axis. Use single line.
|
||||
i, pos
|
||||
#elif MAX7219_Y_LEDS > 8 // At least 16 LEDs on the Y-Axis. Use a single column.
|
||||
pos, i
|
||||
#else // Single 8x8 LED matrix. Use two lines to get 16 LEDs.
|
||||
i >> 1, pos + (i & 1)
|
||||
#endif
|
||||
#else
|
||||
led_set(i, y, nv >= ov); // LED matrix has at least 16 LED's on the X-Axis. Use single line of LED's
|
||||
#endif
|
||||
, nv >= ov
|
||||
);
|
||||
}
|
||||
|
||||
void Max7219::idle_tasks() {
|
||||
|
||||
@@ -53,16 +53,6 @@
|
||||
#endif
|
||||
#define MAX7219_LINES (8 * (MAX7219_NUMBER_UNITS))
|
||||
|
||||
#if _ROT == 0 || _ROT == 180
|
||||
#define MAX7219_Y_LEDS 8
|
||||
#define MAX7219_X_LEDS MAX7219_LINES
|
||||
#elif _ROT == 90 || _ROT == 270
|
||||
#define MAX7219_X_LEDS 8
|
||||
#define MAX7219_Y_LEDS MAX7219_LINES
|
||||
#else
|
||||
#error "MAX7219_ROTATE must be a multiple of +/- 90°."
|
||||
#endif
|
||||
|
||||
//
|
||||
// MAX7219 registers
|
||||
//
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#endif
|
||||
|
||||
#if ENABLED(PCA9533)
|
||||
#include "SailfishRGB_LED.h"
|
||||
#include <SailfishRGB_LED.h>
|
||||
#endif
|
||||
|
||||
#if ENABLED(LED_COLOR_PRESETS)
|
||||
@@ -69,7 +69,7 @@ void LEDLights::setup() {
|
||||
#endif
|
||||
#endif
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
setup_neopixel();
|
||||
neo.init();
|
||||
#endif
|
||||
#if ENABLED(PCA9533)
|
||||
RGBinit();
|
||||
@@ -88,23 +88,28 @@ void LEDLights::set_color(const LEDColor &incol
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
|
||||
const uint32_t neocolor = LEDColorWhite() == incol
|
||||
? pixels.Color(NEO_WHITE)
|
||||
: pixels.Color(incol.r, incol.g, incol.b, incol.w);
|
||||
? neo.Color(NEO_WHITE)
|
||||
: neo.Color(incol.r, incol.g, incol.b, incol.w);
|
||||
static uint16_t nextLed = 0;
|
||||
|
||||
#ifdef NEOPIXEL_BKGD_LED_INDEX
|
||||
if (NEOPIXEL_BKGD_LED_INDEX == nextLed) { nextLed++; return; }
|
||||
if (NEOPIXEL_BKGD_LED_INDEX == nextLed) {
|
||||
if (++nextLed >= neo.pixels()) nextLed = 0;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
pixels.setBrightness(incol.i);
|
||||
if (!isSequence)
|
||||
set_neopixel_color(neocolor);
|
||||
else {
|
||||
pixels.setPixelColor(nextLed, neocolor);
|
||||
pixels.show();
|
||||
if (++nextLed >= pixels.numPixels()) nextLed = 0;
|
||||
|
||||
neo.set_brightness(incol.i);
|
||||
|
||||
if (isSequence) {
|
||||
neo.set_pixel_color(nextLed, neocolor);
|
||||
neo.show();
|
||||
if (++nextLed >= neo.pixels()) nextLed = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
neo.set_color(neocolor);
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(BLINKM)
|
||||
|
||||
@@ -34,73 +34,81 @@
|
||||
#include "../../core/utility.h"
|
||||
#endif
|
||||
|
||||
Adafruit_NeoPixel pixels(NEOPIXEL_PIXELS, NEOPIXEL_PIN, NEOPIXEL_TYPE + NEO_KHZ800);
|
||||
Marlin_NeoPixel neo;
|
||||
|
||||
Adafruit_NeoPixel Marlin_NeoPixel::adaneo1(NEOPIXEL_PIXELS, NEOPIXEL_PIN, NEOPIXEL_TYPE + NEO_KHZ800)
|
||||
#if MULTIPLE_NEOPIXEL_TYPES
|
||||
, Marlin_NeoPixel::adaneo2(NEOPIXEL_PIXELS, NEOPIXEL2_PIN, NEOPIXEL2_TYPE + NEO_KHZ800)
|
||||
#endif
|
||||
;
|
||||
|
||||
#ifdef NEOPIXEL_BKGD_LED_INDEX
|
||||
void set_neopixel_color_background() {
|
||||
|
||||
void Marlin_NeoPixel::set_color_background() {
|
||||
uint8_t background_color[4] = NEOPIXEL_BKGD_COLOR;
|
||||
pixels.setPixelColor(NEOPIXEL_BKGD_LED_INDEX, pixels.Color(background_color[0], background_color[1], background_color[2], background_color[3]));
|
||||
set_pixel_color(NEOPIXEL_BKGD_LED_INDEX, adaneo1.Color(background_color[0], background_color[1], background_color[2], background_color[3]));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void set_neopixel_color(const uint32_t color) {
|
||||
for (uint16_t i = 0; i < pixels.numPixels(); ++i) {
|
||||
void Marlin_NeoPixel::set_color(const uint32_t color) {
|
||||
for (uint16_t i = 0; i < pixels(); ++i) {
|
||||
#ifdef NEOPIXEL_BKGD_LED_INDEX
|
||||
if (i == NEOPIXEL_BKGD_LED_INDEX && color != 0x000000) {
|
||||
set_neopixel_color_background();
|
||||
set_color_background();
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
pixels.setPixelColor(i, color);
|
||||
set_pixel_color(i, color);
|
||||
}
|
||||
pixels.show();
|
||||
show();
|
||||
}
|
||||
|
||||
void set_neopixel_color_startup(const uint32_t color) {
|
||||
for (uint16_t i = 0; i < pixels.numPixels(); ++i)
|
||||
pixels.setPixelColor(i, color);
|
||||
pixels.show();
|
||||
void Marlin_NeoPixel::set_color_startup(const uint32_t color) {
|
||||
for (uint16_t i = 0; i < pixels(); ++i)
|
||||
set_pixel_color(i, color);
|
||||
show();
|
||||
}
|
||||
|
||||
void setup_neopixel() {
|
||||
void Marlin_NeoPixel::init() {
|
||||
SET_OUTPUT(NEOPIXEL_PIN);
|
||||
pixels.setBrightness(NEOPIXEL_BRIGHTNESS); // 0 - 255 range
|
||||
pixels.begin();
|
||||
pixels.show(); // initialize to all off
|
||||
set_brightness(NEOPIXEL_BRIGHTNESS); // 0 - 255 range
|
||||
begin();
|
||||
show(); // initialize to all off
|
||||
|
||||
#if ENABLED(NEOPIXEL_STARTUP_TEST)
|
||||
safe_delay(1000);
|
||||
set_neopixel_color_startup(pixels.Color(255, 0, 0, 0)); // red
|
||||
set_color_startup(adaneo1.Color(255, 0, 0, 0)); // red
|
||||
safe_delay(1000);
|
||||
set_neopixel_color_startup(pixels.Color(0, 255, 0, 0)); // green
|
||||
set_color_startup(adaneo1.Color(0, 255, 0, 0)); // green
|
||||
safe_delay(1000);
|
||||
set_neopixel_color_startup(pixels.Color(0, 0, 255, 0)); // blue
|
||||
set_color_startup(adaneo1.Color(0, 0, 255, 0)); // blue
|
||||
safe_delay(1000);
|
||||
#endif
|
||||
|
||||
#ifdef NEOPIXEL_BKGD_LED_INDEX
|
||||
set_neopixel_color_background();
|
||||
set_color_background();
|
||||
#endif
|
||||
|
||||
#if ENABLED(LED_USER_PRESET_STARTUP)
|
||||
set_neopixel_color(pixels.Color(LED_USER_PRESET_RED, LED_USER_PRESET_GREEN, LED_USER_PRESET_BLUE, LED_USER_PRESET_WHITE));
|
||||
set_color(adaneo1.Color(LED_USER_PRESET_RED, LED_USER_PRESET_GREEN, LED_USER_PRESET_BLUE, LED_USER_PRESET_WHITE));
|
||||
#else
|
||||
set_neopixel_color(pixels.Color(0, 0, 0, 0));
|
||||
set_color(adaneo1.Color(0, 0, 0, 0));
|
||||
#endif
|
||||
}
|
||||
|
||||
#if 0
|
||||
bool neopixel_set_led_color(const uint8_t r, const uint8_t g, const uint8_t b, const uint8_t w, const uint8_t p) {
|
||||
const uint32_t color = pixels.Color(r, g, b, w);
|
||||
pixels.setBrightness(p);
|
||||
bool Marlin_NeoPixel::set_led_color(const uint8_t r, const uint8_t g, const uint8_t b, const uint8_t w, const uint8_t p) {
|
||||
const uint32_t color = adaneo1.Color(r, g, b, w);
|
||||
set_brightness(p);
|
||||
#if DISABLED(NEOPIXEL_IS_SEQUENTIAL)
|
||||
set_neopixel_color(color);
|
||||
set_color(color);
|
||||
return false;
|
||||
#else
|
||||
static uint16_t nextLed = 0;
|
||||
pixels.setPixelColor(nextLed, color);
|
||||
pixels.show();
|
||||
if (++nextLed >= pixels.numPixels()) nextLed = 0;
|
||||
set_pixel_color(nextLed, color);
|
||||
show();
|
||||
if (++nextLed >= pixels()) nextLed = 0;
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -25,11 +25,21 @@
|
||||
* Neopixel support
|
||||
*/
|
||||
|
||||
// ------------------------
|
||||
// Includes
|
||||
// ------------------------
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#include <Adafruit_NeoPixel.h>
|
||||
#include <stdint.h>
|
||||
|
||||
// ------------------------
|
||||
// Defines
|
||||
// ------------------------
|
||||
|
||||
#define MULTIPLE_NEOPIXEL_TYPES (defined(NEOPIXEL2_TYPE) && (NEOPIXEL2_TYPE != NEOPIXEL_TYPE))
|
||||
|
||||
#define NEOPIXEL_IS_RGB (NEOPIXEL_TYPE == NEO_RGB || NEOPIXEL_TYPE == NEO_RBG || NEOPIXEL_TYPE == NEO_GRB || NEOPIXEL_TYPE == NEO_GBR || NEOPIXEL_TYPE == NEO_BRG || NEOPIXEL_TYPE == NEO_BGR)
|
||||
#define NEOPIXEL_IS_RGBW !NEOPIXEL_IS_RGB
|
||||
|
||||
@@ -39,8 +49,70 @@
|
||||
#define NEO_WHITE 0, 0, 0, 255
|
||||
#endif
|
||||
|
||||
void setup_neopixel();
|
||||
void set_neopixel_color(const uint32_t color);
|
||||
//bool neopixel_set_led_color(const uint8_t r, const uint8_t g, const uint8_t b, const uint8_t w, const uint8_t p);
|
||||
// ------------------------
|
||||
// Function prototypes
|
||||
// ------------------------
|
||||
|
||||
extern Adafruit_NeoPixel pixels;
|
||||
class Marlin_NeoPixel {
|
||||
private:
|
||||
static Adafruit_NeoPixel adaneo1
|
||||
#if MULTIPLE_NEOPIXEL_TYPES
|
||||
, adaneo2
|
||||
#endif
|
||||
;
|
||||
|
||||
public:
|
||||
static void init();
|
||||
static void set_color_startup(const uint32_t c);
|
||||
|
||||
static void set_color(const uint32_t c);
|
||||
static void set_color_background();
|
||||
//bool set_led_color(const uint8_t r, const uint8_t g, const uint8_t b, const uint8_t w, const uint8_t p);
|
||||
|
||||
#ifdef NEOPIXEL_BKGD_LED_INDEX
|
||||
static void set_pixel_color(const uint16_t n, const uint32_t c);
|
||||
#endif
|
||||
|
||||
static inline void begin() {
|
||||
adaneo1.begin();
|
||||
#if MULTIPLE_NEOPIXEL_TYPES
|
||||
adaneo2.begin();
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void set_pixel_color(const uint16_t n, const uint32_t c) {
|
||||
adaneo1.setPixelColor(n, c);
|
||||
#if MULTIPLE_NEOPIXEL_TYPES
|
||||
adaneo2.setPixelColor(n, c);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void set_brightness(const uint8_t b) {
|
||||
adaneo1.setBrightness(b);
|
||||
#if MULTIPLE_NEOPIXEL_TYPES
|
||||
adaneo2.setBrightness(b);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void show() {
|
||||
adaneo1.show();
|
||||
#if PIN_EXISTS(NEOPIXEL2)
|
||||
#if MULTIPLE_NEOPIXEL_TYPES
|
||||
adaneo2.show();
|
||||
#else
|
||||
adaneo1.setPin(NEOPIXEL2_PIN);
|
||||
adaneo1.show();
|
||||
adaneo1.setPin(NEOPIXEL_PIN);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
// Accessors
|
||||
static inline uint16_t pixels() { return adaneo1.numPixels(); }
|
||||
static inline uint8_t brightness() { return adaneo1.getBrightness(); }
|
||||
static inline uint32_t Color(uint8_t r, uint8_t g, uint8_t b, uint8_t w) {
|
||||
return adaneo1.Color(r, g, b, w);
|
||||
}
|
||||
};
|
||||
|
||||
extern Marlin_NeoPixel neo;
|
||||
|
||||
@@ -46,7 +46,7 @@ PrinterEventLEDs printerEventLEDs;
|
||||
|
||||
inline void pel_set_rgb(const uint8_t r, const uint8_t g, const uint8_t b) {
|
||||
leds.set_color(
|
||||
MakeLEDColor(r, g, b, 0, pixels.getBrightness())
|
||||
MakeLEDColor(r, g, b, 0, neo.brightness())
|
||||
#if ENABLED(NEOPIXEL_IS_SEQUENTIAL)
|
||||
, true
|
||||
#endif
|
||||
|
||||
@@ -44,10 +44,10 @@
|
||||
void GcodeSuite::M900() {
|
||||
|
||||
#if EXTRUDERS < 2
|
||||
constexpr uint8_t tmp_extruder = 0;
|
||||
constexpr uint8_t tool_index = 0;
|
||||
#else
|
||||
const uint8_t tmp_extruder = parser.intval('T', active_extruder);
|
||||
if (tmp_extruder >= EXTRUDERS) {
|
||||
const uint8_t tool_index = parser.intval('T', active_extruder);
|
||||
if (tool_index >= EXTRUDERS) {
|
||||
SERIAL_ECHOLNPGM("?T value out of range.");
|
||||
return;
|
||||
}
|
||||
@@ -55,17 +55,17 @@ void GcodeSuite::M900() {
|
||||
|
||||
#if ENABLED(EXTRA_LIN_ADVANCE_K)
|
||||
|
||||
bool ext_slot = TEST(lin_adv_slot, tmp_extruder);
|
||||
bool ext_slot = TEST(lin_adv_slot, tool_index);
|
||||
|
||||
if (parser.seenval('S')) {
|
||||
const bool slot = parser.value_bool();
|
||||
if (ext_slot != slot) {
|
||||
ext_slot = slot;
|
||||
SET_BIT_TO(lin_adv_slot, tmp_extruder, slot);
|
||||
SET_BIT_TO(lin_adv_slot, tool_index, slot);
|
||||
planner.synchronize();
|
||||
const float temp = planner.extruder_advance_K[tmp_extruder];
|
||||
planner.extruder_advance_K[tmp_extruder] = saved_extruder_advance_K[tmp_extruder];
|
||||
saved_extruder_advance_K[tmp_extruder] = temp;
|
||||
const float temp = planner.extruder_advance_K[tool_index];
|
||||
planner.extruder_advance_K[tool_index] = saved_extruder_advance_K[tool_index];
|
||||
saved_extruder_advance_K[tool_index] = temp;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,10 +73,10 @@ void GcodeSuite::M900() {
|
||||
const float newK = parser.value_float();
|
||||
if (WITHIN(newK, 0, 10)) {
|
||||
if (ext_slot)
|
||||
saved_extruder_advance_K[tmp_extruder] = newK;
|
||||
saved_extruder_advance_K[tool_index] = newK;
|
||||
else {
|
||||
planner.synchronize();
|
||||
planner.extruder_advance_K[tmp_extruder] = newK;
|
||||
planner.extruder_advance_K[tool_index] = newK;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -87,10 +87,10 @@ void GcodeSuite::M900() {
|
||||
const float newL = parser.value_float();
|
||||
if (WITHIN(newL, 0, 10)) {
|
||||
if (!ext_slot)
|
||||
saved_extruder_advance_K[tmp_extruder] = newL;
|
||||
saved_extruder_advance_K[tool_index] = newL;
|
||||
else {
|
||||
planner.synchronize();
|
||||
planner.extruder_advance_K[tmp_extruder] = newL;
|
||||
planner.extruder_advance_K[tool_index] = newL;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -117,7 +117,7 @@ void GcodeSuite::M900() {
|
||||
const float newK = parser.value_float();
|
||||
if (WITHIN(newK, 0, 10)) {
|
||||
planner.synchronize();
|
||||
planner.extruder_advance_K[tmp_extruder] = newK;
|
||||
planner.extruder_advance_K[tool_index] = newK;
|
||||
}
|
||||
else
|
||||
SERIAL_ECHOLNPGM("?K value out of range (0-10).");
|
||||
|
||||
@@ -50,7 +50,7 @@ void GcodeSuite::M150() {
|
||||
parser.seen('U') ? (parser.has_value() ? parser.value_byte() : 255) : 0,
|
||||
parser.seen('B') ? (parser.has_value() ? parser.value_byte() : 255) : 0,
|
||||
parser.seen('W') ? (parser.has_value() ? parser.value_byte() : 255) : 0,
|
||||
parser.seen('P') ? (parser.has_value() ? parser.value_byte() : 255) : pixels.getBrightness()
|
||||
parser.seen('P') ? (parser.has_value() ? parser.value_byte() : 255) : neo.brightness()
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -151,12 +151,14 @@
|
||||
#define NEOPIXEL_LED
|
||||
#undef NEOPIXEL_TYPE
|
||||
#define NEOPIXEL_TYPE NEO_RGB
|
||||
#undef NEOPIXEL_PIXELS
|
||||
#define NEOPIXEL_PIXELS 3
|
||||
#if NEOPIXEL_PIXELS < 3
|
||||
#undef NEOPIXELS_PIXELS
|
||||
#define NEOPIXEL_PIXELS 3
|
||||
#endif
|
||||
#ifndef NEOPIXEL_BRIGHTNESS
|
||||
#define NEOPIXEL_BRIGHTNESS 127
|
||||
#endif
|
||||
#define NEOPIXEL_STARTUP_TEST
|
||||
//#define NEOPIXEL_STARTUP_TEST
|
||||
#endif
|
||||
|
||||
#elif ENABLED(ULTI_CONTROLLER)
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
|
||||
#ifndef U8G_HAL_LINKS
|
||||
|
||||
|
||||
#ifdef __SAM3X8E__
|
||||
uint8_t u8g_com_HAL_DUE_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
|
||||
#define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_DUE_sw_spi_fn
|
||||
@@ -33,44 +32,41 @@
|
||||
#define U8G_COM_HAL_HW_SPI_FN u8g_com_HAL_DUE_shared_hw_spi_fn
|
||||
uint8_t u8g_com_HAL_DUE_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
|
||||
#define U8G_COM_ST7920_HAL_SW_SPI u8g_com_HAL_DUE_ST7920_sw_spi_fn
|
||||
#define U8G_COM_ST7920_HAL_HW_SPI u8g_com_arduino_st7920_hw_spi_fn
|
||||
#elif defined(__STM32F1__)
|
||||
uint8_t u8g_com_HAL_STM32F1_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
|
||||
#define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_STM32F1_sw_spi_fn
|
||||
uint8_t u8g_com_arduino_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
|
||||
//#define U8G_COM_HAL_HW_SPI_FN u8g_com_arduino_hw_spi_fn
|
||||
#define U8G_COM_HAL_HW_SPI_FN u8g_com_stm32duino_hw_spi_fn
|
||||
uint8_t u8g_com_arduino_st7920_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
|
||||
//#define U8G_COM_ST7920_HAL_SW_SPI u8g_com_arduino_st7920_spi_fn
|
||||
#define U8G_COM_ST7920_HAL_SW_SPI u8g_com_std_sw_spi_fn
|
||||
#define U8G_COM_ST7920_HAL_HW_SPI u8g_com_stm32duino_hw_spi_fn
|
||||
#elif defined(ARDUINO_ARCH_STM32)
|
||||
uint8_t u8g_com_arduino_std_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
|
||||
#define U8G_COM_HAL_SW_SPI_FN u8g_com_arduino_std_sw_spi_fn
|
||||
uint8_t u8g_com_stm32duino_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
|
||||
#define U8G_COM_HAL_HW_SPI_FN u8g_com_stm32duino_hw_spi_fn
|
||||
uint8_t u8g_com_arduino_st7920_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
|
||||
#define U8G_COM_ST7920_HAL_SW_SPI u8g_com_arduino_st7920_spi_fn
|
||||
#else
|
||||
#define U8G_COM_ST7920_HAL_HW_SPI u8g_com_stm32duino_hw_spi_fn
|
||||
#elif defined(__AVR__)
|
||||
uint8_t u8g_com_HAL_AVR_sw_sp_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
|
||||
#define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_AVR_sw_sp_fn // AVR ?
|
||||
uint8_t u8g_com_arduino_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
|
||||
#define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_AVR_sw_sp_fn
|
||||
#define U8G_COM_HAL_HW_SPI_FN u8g_com_arduino_hw_spi_fn
|
||||
uint8_t u8g_com_arduino_st7920_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
|
||||
#define U8G_COM_ST7920_HAL_SW_SPI u8g_com_arduino_st7920_spi_fn
|
||||
#define U8G_COM_ST7920_HAL_HW_SPI u8g_com_arduino_st7920_hw_spi_fn
|
||||
#else
|
||||
#define U8G_COM_HAL_SW_SPI_FN u8g_com_arduino_std_sw_spi_fn
|
||||
#define U8G_COM_HAL_HW_SPI_FN u8g_com_arduino_hw_spi_fn
|
||||
#define U8G_COM_ST7920_HAL_SW_SPI u8g_com_arduino_st7920_spi_fn
|
||||
#define U8G_COM_ST7920_HAL_HW_SPI u8g_com_arduino_st7920_hw_spi_fn
|
||||
#endif
|
||||
|
||||
uint8_t u8g_com_arduino_st7920_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
|
||||
#define U8G_COM_ST7920_HAL_HW_SPI u8g_com_arduino_st7920_hw_spi_fn
|
||||
|
||||
uint8_t u8g_com_HAL_LPC1768_ssd_hw_i2c_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
|
||||
#define U8G_COM_SSD_I2C_HAL u8g_com_arduino_ssd_i2c_fn
|
||||
|
||||
#if defined(ARDUINO_ARCH_STM32F1) && PIN_EXISTS(FSMC_CS)
|
||||
#if PIN_EXISTS(FSMC_CS)
|
||||
uint8_t u8g_com_stm32duino_fsmc_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
|
||||
#define U8G_COM_HAL_FSMC_FN u8g_com_stm32duino_fsmc_fn
|
||||
#else
|
||||
#define U8G_COM_HAL_FSMC_FN u8g_com_null_fn
|
||||
#endif
|
||||
|
||||
#elif TARGET_LPC1768
|
||||
uint8_t u8g_com_HAL_LPC1768_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
|
||||
#define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_LPC1768_sw_spi_fn
|
||||
|
||||
@@ -334,7 +334,6 @@ uint8_t u8g_dev_tft_320x240_upscale_from_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, u
|
||||
#else
|
||||
uint16_t buffer[256]; // 16-bit RGB 565 pixel line buffer
|
||||
#endif
|
||||
uint16_t i;
|
||||
switch (msg) {
|
||||
case U8G_DEV_MSG_INIT:
|
||||
dev->com_fn(u8g, U8G_COM_MSG_INIT, U8G_SPI_CLK_CYCLE_NONE, &lcd_id);
|
||||
|
||||
@@ -676,22 +676,20 @@ namespace ExtUI {
|
||||
UNUSED(mm);
|
||||
#endif
|
||||
|
||||
#if EXTRUDERS > 1
|
||||
#if EXTRUDERS > 1 && HAS_HOTEND_OFFSET
|
||||
/**
|
||||
* When linked_nozzles is false, as an axis is babystepped
|
||||
* adjust the hotend offsets so that the other nozzles are
|
||||
* unaffected by the babystepping of the active nozzle.
|
||||
*/
|
||||
if (!linked_nozzles) {
|
||||
//HOTEND_LOOP()
|
||||
//if (e != active_extruder)
|
||||
//hotend_offset[axis][e] += mm;
|
||||
HOTEND_LOOP()
|
||||
if (e != active_extruder)
|
||||
hotend_offset[axis][e] += mm;
|
||||
|
||||
#if HAS_HOTEND_OFFSET
|
||||
normalizeNozzleOffset(X);
|
||||
normalizeNozzleOffset(Y);
|
||||
normalizeNozzleOffset(Z);
|
||||
#endif
|
||||
normalizeNozzleOffset(X);
|
||||
normalizeNozzleOffset(Y);
|
||||
normalizeNozzleOffset(Z);
|
||||
}
|
||||
#else
|
||||
UNUSED(linked_nozzles);
|
||||
|
||||
@@ -156,15 +156,16 @@ void MenuItemBase::init(PGM_P const el, void * const ev, const int32_t minv, con
|
||||
|
||||
#define DEFINE_MENU_EDIT_ITEM(NAME) template class TMenuItem<MenuItemInfo_##NAME>
|
||||
|
||||
DEFINE_MENU_EDIT_ITEM(percent); // 100% right-justified
|
||||
DEFINE_MENU_EDIT_ITEM(int3); // 123, -12 right-justified
|
||||
DEFINE_MENU_EDIT_ITEM(int4); // 1234, -123 right-justified
|
||||
DEFINE_MENU_EDIT_ITEM(int8); // 123, -12 right-justified
|
||||
DEFINE_MENU_EDIT_ITEM(uint8); // 123 right-justified
|
||||
DEFINE_MENU_EDIT_ITEM(uint16_3); // 123, -12 right-justified
|
||||
DEFINE_MENU_EDIT_ITEM(uint16_3); // 123 right-justified
|
||||
DEFINE_MENU_EDIT_ITEM(uint16_4); // 1234 right-justified
|
||||
DEFINE_MENU_EDIT_ITEM(uint16_5); // 12345 right-justified
|
||||
DEFINE_MENU_EDIT_ITEM(float3); // 123 right-justified
|
||||
DEFINE_MENU_EDIT_ITEM(float52); // 123.45
|
||||
DEFINE_MENU_EDIT_ITEM(float52); // _2.34, 12.34, -2.34 or 123.45, -23.45
|
||||
DEFINE_MENU_EDIT_ITEM(float43); // 1.234
|
||||
DEFINE_MENU_EDIT_ITEM(float5); // 12345 right-justified
|
||||
DEFINE_MENU_EDIT_ITEM(float5_25); // 12345 right-justified (25 increment)
|
||||
|
||||
@@ -59,7 +59,7 @@ DECLARE_MENU_EDIT_TYPE(float, float52, ftostr42_52, 100 ); // _2.
|
||||
DECLARE_MENU_EDIT_TYPE(float, float43, ftostr43sign, 1000 ); // 1.234
|
||||
DECLARE_MENU_EDIT_TYPE(float, float5, ftostr5rj, 0.01f ); // 12345 right-justified
|
||||
DECLARE_MENU_EDIT_TYPE(float, float5_25, ftostr5rj, 0.04f ); // 12345 right-justified (25 increment)
|
||||
DECLARE_MENU_EDIT_TYPE(float, float51, ftostr51rj, 10 ); // _1234.5 right-justified
|
||||
DECLARE_MENU_EDIT_TYPE(float, float51, ftostr51rj, 10 ); // 1234.5 right-justified
|
||||
DECLARE_MENU_EDIT_TYPE(float, float51sign, ftostr51sign, 10 ); // +1234.5
|
||||
DECLARE_MENU_EDIT_TYPE(float, float52sign, ftostr52sign, 100 ); // +123.45
|
||||
DECLARE_MENU_EDIT_TYPE(uint32_t, long5, ftostr5rj, 0.01f ); // 12345 right-justified
|
||||
|
||||
@@ -50,7 +50,9 @@
|
||||
#define HAS_DEBUG_MENU ENABLED(LCD_PROGRESS_BAR_TEST)
|
||||
|
||||
void menu_advanced_settings();
|
||||
void menu_delta_calibrate();
|
||||
#if EITHER(DELTA_CALIBRATION_MENU, DELTA_AUTO_CALIBRATION)
|
||||
void menu_delta_calibrate();
|
||||
#endif
|
||||
|
||||
static void lcd_factory_settings() {
|
||||
settings.reset();
|
||||
|
||||
@@ -414,8 +414,11 @@ void menu_move() {
|
||||
END_MENU();
|
||||
}
|
||||
|
||||
void _lcd_ubl_level_bed();
|
||||
void menu_bed_leveling();
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
void _lcd_ubl_level_bed();
|
||||
#elif ENABLED(LCD_BED_LEVELING)
|
||||
void menu_bed_leveling();
|
||||
#endif
|
||||
|
||||
void menu_motion() {
|
||||
START_MENU();
|
||||
|
||||
@@ -538,7 +538,7 @@ void MarlinUI::status_screen() {
|
||||
return;
|
||||
}
|
||||
|
||||
#endif // HAS_LCD_MENU
|
||||
#endif
|
||||
|
||||
#if ENABLED(ULTIPANEL_FEEDMULTIPLY)
|
||||
|
||||
@@ -587,8 +587,8 @@ void MarlinUI::kill_screen(PGM_P lcd_msg) {
|
||||
#ifdef LED_BACKLIGHT_TIMEOUT
|
||||
leds.set_color(LEDColorRed());
|
||||
#ifdef NEOPIXEL_BKGD_LED_INDEX
|
||||
pixels.setPixelColor(NEOPIXEL_BKGD_LED_INDEX, 255, 0, 0, 0);
|
||||
pixels.show();
|
||||
neo.set_pixel_color(NEOPIXEL_BKGD_LED_INDEX, 255, 0, 0, 0);
|
||||
neo.show();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -802,7 +802,9 @@ void MarlinUI::update() {
|
||||
card.release();
|
||||
if (old_sd_status != 2) {
|
||||
set_status_P(PSTR(MSG_SD_REMOVED));
|
||||
if (!on_status_screen()) return_to_status();
|
||||
#if HAS_LCD_MENU
|
||||
return_to_status();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1467,7 +1469,7 @@ void MarlinUI::update() {
|
||||
#endif
|
||||
print_job_timer.stop();
|
||||
set_status_P(PSTR(MSG_PRINT_ABORTED));
|
||||
#if HAS_SPI_LCD
|
||||
#if HAS_LCD_MENU
|
||||
return_to_status();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "../core/language.h"
|
||||
#include "../HAL/shared/Delay.h"
|
||||
|
||||
#define MAX6675_SEPARATE_SPI EITHER(HEATER_0_USES_MAX6675, HEATER_1_USES_MAX6675) && PIN_EXISTS(MAX6675_SCK, MAX6675_DO)
|
||||
#define MAX6675_SEPARATE_SPI (EITHER(HEATER_0_USES_MAX6675, HEATER_1_USES_MAX6675) && PIN_EXISTS(MAX6675_SCK, MAX6675_DO))
|
||||
|
||||
#if MAX6675_SEPARATE_SPI
|
||||
#include "../libs/private_spi.h"
|
||||
|
||||
@@ -146,10 +146,10 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
parkingtraveldistance, // M951 D
|
||||
compensationmultiplier;
|
||||
|
||||
inline void magnetic_parking_extruder_tool_change(const uint8_t tmp_extruder) {
|
||||
inline void magnetic_parking_extruder_tool_change(const uint8_t new_tool) {
|
||||
|
||||
const float oldx = current_position[X_AXIS],
|
||||
grabpos = mpe_settings.parking_xpos[tmp_extruder] + (tmp_extruder ? mpe_settings.grab_distance : -mpe_settings.grab_distance),
|
||||
grabpos = mpe_settings.parking_xpos[new_tool] + (new_tool ? mpe_settings.grab_distance : -mpe_settings.grab_distance),
|
||||
offsetcompensation =
|
||||
#if HAS_HOTEND_OFFSET
|
||||
hotend_offset[X_AXIS][active_extruder] * mpe_settings.compensation_factor
|
||||
@@ -174,14 +174,14 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
|
||||
// STEP 1
|
||||
|
||||
current_position[X_AXIS] = mpe_settings.parking_xpos[tmp_extruder] + offsetcompensation;
|
||||
current_position[X_AXIS] = mpe_settings.parking_xpos[new_tool] + offsetcompensation;
|
||||
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
DEBUG_ECHOPAIR("(1) Move extruder ", int(tmp_extruder));
|
||||
DEBUG_ECHOPAIR("(1) Move extruder ", int(new_tool));
|
||||
DEBUG_POS(" to new extruder ParkPos", current_position);
|
||||
}
|
||||
|
||||
planner.buffer_line(current_position, mpe_settings.fast_feedrate, tmp_extruder);
|
||||
planner.buffer_line(current_position, mpe_settings.fast_feedrate, new_tool);
|
||||
planner.synchronize();
|
||||
|
||||
// STEP 2
|
||||
@@ -189,11 +189,11 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
current_position[X_AXIS] = grabpos + offsetcompensation;
|
||||
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
DEBUG_ECHOPAIR("(2) Couple extruder ", int(tmp_extruder));
|
||||
DEBUG_ECHOPAIR("(2) Couple extruder ", int(new_tool));
|
||||
DEBUG_POS(" to new extruder GrabPos", current_position);
|
||||
}
|
||||
|
||||
planner.buffer_line(current_position, mpe_settings.slow_feedrate, tmp_extruder);
|
||||
planner.buffer_line(current_position, mpe_settings.slow_feedrate, new_tool);
|
||||
planner.synchronize();
|
||||
|
||||
// Delay before moving tool, to allow magnetic coupling
|
||||
@@ -201,24 +201,24 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
|
||||
// STEP 3
|
||||
|
||||
current_position[X_AXIS] = mpe_settings.parking_xpos[tmp_extruder] + offsetcompensation;
|
||||
current_position[X_AXIS] = mpe_settings.parking_xpos[new_tool] + offsetcompensation;
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
DEBUG_ECHOPAIR("(3) Move extruder ", int(tmp_extruder));
|
||||
DEBUG_ECHOPAIR("(3) Move extruder ", int(new_tool));
|
||||
DEBUG_POS(" back to new extruder ParkPos", current_position);
|
||||
}
|
||||
|
||||
planner.buffer_line(current_position, mpe_settings.slow_feedrate, tmp_extruder);
|
||||
planner.buffer_line(current_position, mpe_settings.slow_feedrate, new_tool);
|
||||
planner.synchronize();
|
||||
|
||||
// STEP 4
|
||||
|
||||
current_position[X_AXIS] = mpe_settings.parking_xpos[active_extruder] + (active_extruder == 0 ? MPE_TRAVEL_DISTANCE : -MPE_TRAVEL_DISTANCE) + offsetcompensation;
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
DEBUG_ECHOPAIR("(4) Move extruder ", int(tmp_extruder));
|
||||
DEBUG_ECHOPAIR("(4) Move extruder ", int(new_tool));
|
||||
DEBUG_POS(" close to old extruder ParkPos", current_position);
|
||||
}
|
||||
|
||||
planner.buffer_line(current_position, mpe_settings.fast_feedrate, tmp_extruder);
|
||||
planner.buffer_line(current_position, mpe_settings.fast_feedrate, new_tool);
|
||||
planner.synchronize();
|
||||
|
||||
// STEP 5
|
||||
@@ -226,11 +226,11 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
current_position[X_AXIS] = mpe_settings.parking_xpos[active_extruder] + offsetcompensation;
|
||||
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
DEBUG_ECHOPAIR("(5) Park extruder ", int(tmp_extruder));
|
||||
DEBUG_ECHOPAIR("(5) Park extruder ", int(new_tool));
|
||||
DEBUG_POS(" at old extruder ParkPos", current_position);
|
||||
}
|
||||
|
||||
planner.buffer_line(current_position, mpe_settings.slow_feedrate, tmp_extruder);
|
||||
planner.buffer_line(current_position, mpe_settings.slow_feedrate, new_tool);
|
||||
planner.synchronize();
|
||||
|
||||
// STEP 6
|
||||
@@ -238,11 +238,11 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
current_position[X_AXIS] = oldx;
|
||||
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
DEBUG_ECHOPAIR("(6) Move extruder ", int(tmp_extruder));
|
||||
DEBUG_ECHOPAIR("(6) Move extruder ", int(new_tool));
|
||||
DEBUG_POS(" to starting position", current_position);
|
||||
}
|
||||
|
||||
planner.buffer_line(current_position, mpe_settings.fast_feedrate, tmp_extruder);
|
||||
planner.buffer_line(current_position, mpe_settings.fast_feedrate, new_tool);
|
||||
planner.synchronize();
|
||||
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Autopark done.");
|
||||
@@ -269,7 +269,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void parking_extruder_tool_change(const uint8_t tmp_extruder, bool no_move) {
|
||||
inline void parking_extruder_tool_change(const uint8_t new_tool, bool no_move) {
|
||||
if (!no_move) {
|
||||
|
||||
constexpr float parkingposx[] = PARKING_EXTRUDER_PARKING_X;
|
||||
@@ -281,7 +281,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
#endif
|
||||
|
||||
const float midpos = (parkingposx[0] + parkingposx[1]) * 0.5 + x_offset,
|
||||
grabpos = parkingposx[tmp_extruder] + (tmp_extruder ? PARKING_EXTRUDER_GRAB_DISTANCE : -(PARKING_EXTRUDER_GRAB_DISTANCE)) + x_offset;
|
||||
grabpos = parkingposx[new_tool] + (new_tool ? PARKING_EXTRUDER_GRAB_DISTANCE : -(PARKING_EXTRUDER_GRAB_DISTANCE)) + x_offset;
|
||||
|
||||
/**
|
||||
* 1. Move to park position of old extruder
|
||||
@@ -325,11 +325,11 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
#if ENABLED(PARKING_EXTRUDER_SOLENOIDS_INVERT)
|
||||
pe_activate_solenoid(active_extruder); // Just save power for inverted magnets
|
||||
#endif
|
||||
pe_activate_solenoid(tmp_extruder);
|
||||
pe_activate_solenoid(new_tool);
|
||||
|
||||
// STEP 5
|
||||
|
||||
current_position[X_AXIS] = grabpos + (tmp_extruder ? -10 : 10);
|
||||
current_position[X_AXIS] = grabpos + (new_tool ? -10 : 10);
|
||||
fast_line_to_current(X_AXIS);
|
||||
|
||||
current_position[X_AXIS] = grabpos;
|
||||
@@ -343,7 +343,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
|
||||
current_position[X_AXIS] = midpos
|
||||
#if HAS_HOTEND_OFFSET
|
||||
- hotend_offset[X_AXIS][tmp_extruder]
|
||||
- hotend_offset[X_AXIS][new_tool]
|
||||
#endif
|
||||
;
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
@@ -357,7 +357,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
}
|
||||
else { // nomove == true
|
||||
// Only engage magnetic field for new extruder
|
||||
pe_activate_solenoid(tmp_extruder);
|
||||
pe_activate_solenoid(new_tool);
|
||||
#if ENABLED(PARKING_EXTRUDER_SOLENOIDS_INVERT)
|
||||
pe_activate_solenoid(active_extruder); // Just save power for inverted magnets
|
||||
#endif
|
||||
@@ -368,14 +368,14 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
|
||||
#if ENABLED(SWITCHING_TOOLHEAD)
|
||||
|
||||
inline void switching_toolhead_tool_change(const uint8_t tmp_extruder, bool no_move/*=false*/) {
|
||||
inline void switching_toolhead_tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
|
||||
if (no_move) return;
|
||||
|
||||
constexpr uint16_t angles[2] = SWITCHING_TOOLHEAD_SERVO_ANGLES;
|
||||
|
||||
constexpr float toolheadposx[] = SWITCHING_TOOLHEAD_X_POS;
|
||||
const float placexpos = toolheadposx[active_extruder],
|
||||
grabxpos = toolheadposx[tmp_extruder];
|
||||
grabxpos = toolheadposx[new_tool];
|
||||
|
||||
/**
|
||||
* 1. Move to switch position of current toolhead
|
||||
@@ -464,7 +464,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
|
||||
#elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD)
|
||||
|
||||
inline void magnetic_switching_toolhead_tool_change(const uint8_t tmp_extruder, bool no_move/*=false*/) {
|
||||
inline void magnetic_switching_toolhead_tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
|
||||
if (no_move) return;
|
||||
|
||||
constexpr float toolheadposx[] = SWITCHING_TOOLHEAD_X_POS,
|
||||
@@ -472,8 +472,8 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
|
||||
const float placexpos = toolheadposx[active_extruder],
|
||||
placexclear = toolheadclearx[active_extruder],
|
||||
grabxpos = toolheadposx[tmp_extruder],
|
||||
grabxclear = toolheadclearx[tmp_extruder];
|
||||
grabxpos = toolheadposx[new_tool],
|
||||
grabxclear = toolheadclearx[new_tool];
|
||||
|
||||
/**
|
||||
* 1. Move to switch position of current toolhead
|
||||
@@ -564,11 +564,11 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
#if ENABLED(PRIME_BEFORE_REMOVE) && (SWITCHING_TOOLHEAD_PRIME_MM || SWITCHING_TOOLHEAD_RETRACT_MM)
|
||||
#if SWITCHING_TOOLHEAD_PRIME_MM
|
||||
current_position[E_AXIS] += SWITCHING_TOOLHEAD_PRIME_MM;
|
||||
planner.buffer_line(current_position, MMM_TO_MMS(SWITCHING_TOOLHEAD_PRIME_FEEDRATE), tmp_extruder);
|
||||
planner.buffer_line(current_position, MMM_TO_MMS(SWITCHING_TOOLHEAD_PRIME_FEEDRATE), new_tool);
|
||||
#endif
|
||||
#if SWITCHING_TOOLHEAD_RETRACT_MM
|
||||
current_position[E_AXIS] -= SWITCHING_TOOLHEAD_RETRACT_MM;
|
||||
planner.buffer_line(current_position, MMM_TO_MMS(SWITCHING_TOOLHEAD_RETRACT_FEEDRATE), tmp_extruder);
|
||||
planner.buffer_line(current_position, MMM_TO_MMS(SWITCHING_TOOLHEAD_RETRACT_FEEDRATE), new_tool);
|
||||
#endif
|
||||
#else
|
||||
planner.synchronize();
|
||||
@@ -595,12 +595,12 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
inline void est_deactivate_solenoid() { OUT_WRITE(SOL0_PIN, LOW); }
|
||||
void est_init() { est_activate_solenoid(); }
|
||||
|
||||
inline void em_switching_toolhead_tool_change(const uint8_t tmp_extruder, bool no_move) {
|
||||
inline void em_switching_toolhead_tool_change(const uint8_t new_tool, bool no_move) {
|
||||
if (no_move) return;
|
||||
|
||||
constexpr float toolheadposx[] = SWITCHING_TOOLHEAD_X_POS;
|
||||
const float placexpos = toolheadposx[active_extruder],
|
||||
grabxpos = toolheadposx[tmp_extruder];
|
||||
grabxpos = toolheadposx[new_tool];
|
||||
|
||||
/**
|
||||
* 1. Raise Z-Axis to give enough clearance
|
||||
@@ -688,7 +688,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
|
||||
// 9. Apply Z hotend offset to current position
|
||||
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("(9) Applying Z-offset", current_position);
|
||||
current_position[Z_AXIS] += hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][tmp_extruder];
|
||||
current_position[Z_AXIS] += hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][new_tool];
|
||||
|
||||
if (DEBUGGING(LEVELING)) DEBUG_POS("EMST Tool-Change done.", current_position);
|
||||
}
|
||||
@@ -703,7 +703,7 @@ inline void invalid_extruder_error(const uint8_t e) {
|
||||
|
||||
#if ENABLED(DUAL_X_CARRIAGE)
|
||||
|
||||
inline void dualx_tool_change(const uint8_t tmp_extruder, bool &no_move) {
|
||||
inline void dualx_tool_change(const uint8_t new_tool, bool &no_move) {
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
DEBUG_ECHOPGM("Dual X Carriage Mode ");
|
||||
switch (dual_x_carriage_mode) {
|
||||
@@ -728,7 +728,7 @@ inline void invalid_extruder_error(const uint8_t e) {
|
||||
}
|
||||
|
||||
// Activate the new extruder ahead of calling set_axis_is_at_home!
|
||||
active_extruder = tmp_extruder;
|
||||
active_extruder = new_tool;
|
||||
|
||||
// This function resets the max/min values - the current position may be overwritten below.
|
||||
set_axis_is_at_home(X_AXIS);
|
||||
@@ -764,35 +764,35 @@ inline void invalid_extruder_error(const uint8_t e) {
|
||||
* Perform a tool-change, which may result in moving the
|
||||
* previous tool out of the way and the new tool into place.
|
||||
*/
|
||||
void tool_change(const uint8_t tmp_extruder, bool no_move/*=false*/) {
|
||||
void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
|
||||
|
||||
#if ENABLED(MAGNETIC_SWITCHING_TOOLHEAD)
|
||||
if (tmp_extruder == active_extruder) return;
|
||||
if (new_tool == active_extruder) return;
|
||||
#endif
|
||||
|
||||
#if ENABLED(MIXING_EXTRUDER)
|
||||
|
||||
UNUSED(no_move);
|
||||
|
||||
if (tmp_extruder >= MIXING_VIRTUAL_TOOLS)
|
||||
return invalid_extruder_error(tmp_extruder);
|
||||
if (new_tool >= MIXING_VIRTUAL_TOOLS)
|
||||
return invalid_extruder_error(new_tool);
|
||||
|
||||
#if MIXING_VIRTUAL_TOOLS > 1
|
||||
// T0-Tnnn: Switch virtual tool by changing the index to the mix
|
||||
mixer.T(tmp_extruder);
|
||||
mixer.T(new_tool);
|
||||
#endif
|
||||
|
||||
#elif ENABLED(PRUSA_MMU2)
|
||||
|
||||
UNUSED(no_move);
|
||||
|
||||
mmu2.tool_change(tmp_extruder);
|
||||
mmu2.tool_change(new_tool);
|
||||
|
||||
#elif EXTRUDERS < 2
|
||||
|
||||
UNUSED(no_move);
|
||||
|
||||
if (tmp_extruder) invalid_extruder_error(tmp_extruder);
|
||||
if (new_tool) invalid_extruder_error(new_tool);
|
||||
return;
|
||||
|
||||
#else // EXTRUDERS > 1
|
||||
@@ -800,12 +800,12 @@ void tool_change(const uint8_t tmp_extruder, bool no_move/*=false*/) {
|
||||
planner.synchronize();
|
||||
|
||||
#if ENABLED(DUAL_X_CARRIAGE) // Only T0 allowed if the Printer is in DXC_DUPLICATION_MODE or DXC_MIRRORED_MODE
|
||||
if (tmp_extruder != 0 && dxc_is_duplicating())
|
||||
return invalid_extruder_error(tmp_extruder);
|
||||
if (new_tool != 0 && dxc_is_duplicating())
|
||||
return invalid_extruder_error(new_tool);
|
||||
#endif
|
||||
|
||||
if (tmp_extruder >= EXTRUDERS)
|
||||
return invalid_extruder_error(tmp_extruder);
|
||||
if (new_tool >= EXTRUDERS)
|
||||
return invalid_extruder_error(new_tool);
|
||||
|
||||
if (!no_move && !all_axes_homed()) {
|
||||
no_move = true;
|
||||
@@ -822,12 +822,13 @@ void tool_change(const uint8_t tmp_extruder, bool no_move/*=false*/) {
|
||||
constexpr bool idex_full_control = false;
|
||||
#endif
|
||||
|
||||
const uint8_t old_tool = active_extruder;
|
||||
const bool can_move_away = !no_move && !idex_full_control;
|
||||
|
||||
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
|
||||
const bool should_swap = can_move_away && toolchange_settings.swap_length;
|
||||
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
||||
const bool too_cold = !DEBUGGING(DRYRUN) && (thermalManager.targetTooColdToExtrude(active_extruder) || thermalManager.targetTooColdToExtrude(tmp_extruder));
|
||||
const bool too_cold = !DEBUGGING(DRYRUN) && (thermalManager.targetTooColdToExtrude(old_tool) || thermalManager.targetTooColdToExtrude(new_tool));
|
||||
#else
|
||||
constexpr bool too_cold = false;
|
||||
#endif
|
||||
@@ -835,7 +836,7 @@ void tool_change(const uint8_t tmp_extruder, bool no_move/*=false*/) {
|
||||
if (too_cold) {
|
||||
SERIAL_ECHO_MSG(MSG_ERR_HOTEND_TOO_COLD);
|
||||
#if ENABLED(SINGLENOZZLE)
|
||||
active_extruder = tmp_extruder;
|
||||
active_extruder = new_tool;
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
@@ -843,8 +844,8 @@ void tool_change(const uint8_t tmp_extruder, bool no_move/*=false*/) {
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
do_pause_e_move(-toolchange_settings.swap_length, MMM_TO_MMS(toolchange_settings.retract_speed));
|
||||
#else
|
||||
current_position[E_AXIS] -= toolchange_settings.swap_length / planner.e_factor[active_extruder];
|
||||
planner.buffer_line(current_position, MMM_TO_MMS(toolchange_settings.retract_speed), active_extruder);
|
||||
current_position[E_AXIS] -= toolchange_settings.swap_length / planner.e_factor[old_tool];
|
||||
planner.buffer_line(current_position, MMM_TO_MMS(toolchange_settings.retract_speed), old_tool);
|
||||
planner.synchronize();
|
||||
#endif
|
||||
}
|
||||
@@ -856,17 +857,17 @@ void tool_change(const uint8_t tmp_extruder, bool no_move/*=false*/) {
|
||||
TEMPORARY_BED_LEVELING_STATE(false);
|
||||
#endif
|
||||
|
||||
if (tmp_extruder != active_extruder) {
|
||||
if (new_tool != old_tool) {
|
||||
|
||||
#if SWITCHING_NOZZLE_TWO_SERVOS
|
||||
raise_nozzle(active_extruder);
|
||||
raise_nozzle(old_tool);
|
||||
#endif
|
||||
|
||||
REMEMBER(fr, feedrate_mm_s, XY_PROBE_FEEDRATE_MM_S);
|
||||
|
||||
#if HAS_SOFTWARE_ENDSTOPS
|
||||
#if HAS_HOTEND_OFFSET
|
||||
#define _EXT_ARGS , active_extruder, tmp_extruder
|
||||
#define _EXT_ARGS , old_tool, new_tool
|
||||
#else
|
||||
#define _EXT_ARGS
|
||||
#endif
|
||||
@@ -891,7 +892,7 @@ void tool_change(const uint8_t tmp_extruder, bool no_move/*=false*/) {
|
||||
current_position[X_AXIS] = toolchange_settings.change_point.x;
|
||||
current_position[Y_AXIS] = toolchange_settings.change_point.y;
|
||||
#endif
|
||||
planner.buffer_line(current_position, feedrate_mm_s, active_extruder);
|
||||
planner.buffer_line(current_position, feedrate_mm_s, old_tool);
|
||||
planner.synchronize();
|
||||
}
|
||||
#endif
|
||||
@@ -900,26 +901,26 @@ void tool_change(const uint8_t tmp_extruder, bool no_move/*=false*/) {
|
||||
#if ENABLED(DUAL_X_CARRIAGE)
|
||||
constexpr float xdiff = 0;
|
||||
#else
|
||||
const float xdiff = hotend_offset[X_AXIS][tmp_extruder] - hotend_offset[X_AXIS][active_extruder];
|
||||
const float xdiff = hotend_offset[X_AXIS][new_tool] - hotend_offset[X_AXIS][old_tool];
|
||||
#endif
|
||||
const float ydiff = hotend_offset[Y_AXIS][tmp_extruder] - hotend_offset[Y_AXIS][active_extruder],
|
||||
zdiff = hotend_offset[Z_AXIS][tmp_extruder] - hotend_offset[Z_AXIS][active_extruder];
|
||||
const float ydiff = hotend_offset[Y_AXIS][new_tool] - hotend_offset[Y_AXIS][old_tool],
|
||||
zdiff = hotend_offset[Z_AXIS][new_tool] - hotend_offset[Z_AXIS][old_tool];
|
||||
#else
|
||||
constexpr float xdiff = 0, ydiff = 0, zdiff = 0;
|
||||
#endif
|
||||
|
||||
#if ENABLED(DUAL_X_CARRIAGE)
|
||||
dualx_tool_change(tmp_extruder, no_move);
|
||||
dualx_tool_change(new_tool, no_move);
|
||||
#elif ENABLED(PARKING_EXTRUDER) // Dual Parking extruder
|
||||
parking_extruder_tool_change(tmp_extruder, no_move);
|
||||
parking_extruder_tool_change(new_tool, no_move);
|
||||
#elif ENABLED(MAGNETIC_PARKING_EXTRUDER) // Magnetic Parking extruder
|
||||
magnetic_parking_extruder_tool_change(tmp_extruder);
|
||||
magnetic_parking_extruder_tool_change(new_tool);
|
||||
#elif ENABLED(SWITCHING_TOOLHEAD) // Switching Toolhead
|
||||
switching_toolhead_tool_change(tmp_extruder, no_move);
|
||||
switching_toolhead_tool_change(new_tool, no_move);
|
||||
#elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) // Magnetic Switching Toolhead
|
||||
magnetic_switching_toolhead_tool_change(tmp_extruder, no_move);
|
||||
magnetic_switching_toolhead_tool_change(new_tool, no_move);
|
||||
#elif ENABLED(ELECTROMAGNETIC_SWITCHING_TOOLHEAD) // Magnetic Switching ToolChanger
|
||||
em_switching_toolhead_tool_change(tmp_extruder, no_move);
|
||||
em_switching_toolhead_tool_change(new_tool, no_move);
|
||||
#elif ENABLED(SWITCHING_NOZZLE) && !SWITCHING_NOZZLE_TWO_SERVOS // Switching Nozzle (single servo)
|
||||
// Raise by a configured distance to avoid workpiece, except with
|
||||
// SWITCHING_NOZZLE_TWO_SERVOS, as both nozzles will lift instead.
|
||||
@@ -928,7 +929,7 @@ void tool_change(const uint8_t tmp_extruder, bool no_move/*=false*/) {
|
||||
NOMORE(current_position[Z_AXIS], soft_endstop[Z_AXIS].max);
|
||||
#endif
|
||||
if (!no_move) fast_line_to_current(Z_AXIS);
|
||||
move_nozzle_servo(tmp_extruder);
|
||||
move_nozzle_servo(new_tool);
|
||||
#endif
|
||||
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Offset Tool XY by { ", xdiff, ", ", ydiff, ", ", zdiff, " }");
|
||||
@@ -939,7 +940,7 @@ void tool_change(const uint8_t tmp_extruder, bool no_move/*=false*/) {
|
||||
current_position[Z_AXIS] += zdiff;
|
||||
|
||||
// Set the new active extruder if not already done in tool specific function above
|
||||
active_extruder = tmp_extruder;
|
||||
active_extruder = new_tool;
|
||||
|
||||
// Tell the planner the new "current position"
|
||||
sync_plan_position();
|
||||
@@ -956,28 +957,30 @@ void tool_change(const uint8_t tmp_extruder, bool no_move/*=false*/) {
|
||||
|
||||
#if ENABLED(SINGLENOZZLE)
|
||||
#if FAN_COUNT > 0
|
||||
singlenozzle_fan_speed[active_extruder] = thermalManager.fan_speed[0];
|
||||
thermalManager.fan_speed[0] = singlenozzle_fan_speed[tmp_extruder];
|
||||
singlenozzle_fan_speed[old_tool] = thermalManager.fan_speed[0];
|
||||
thermalManager.fan_speed[0] = singlenozzle_fan_speed[new_tool];
|
||||
#endif
|
||||
|
||||
singlenozzle_temp[active_extruder] = thermalManager.temp_hotend[0].target;
|
||||
if (singlenozzle_temp[tmp_extruder] && singlenozzle_temp[tmp_extruder] != singlenozzle_temp[active_extruder]) {
|
||||
thermalManager.setTargetHotend(singlenozzle_temp[tmp_extruder], 0);
|
||||
singlenozzle_temp[old_tool] = thermalManager.temp_hotend[0].target;
|
||||
if (singlenozzle_temp[new_tool] && singlenozzle_temp[new_tool] != singlenozzle_temp[old_tool]) {
|
||||
thermalManager.setTargetHotend(singlenozzle_temp[new_tool], 0);
|
||||
#if HAS_DISPLAY
|
||||
thermalManager.set_heating_message(0);
|
||||
#endif
|
||||
(void)thermalManager.wait_for_hotend(0, false); // Wait for heating or cooling
|
||||
}
|
||||
active_extruder = tmp_extruder;
|
||||
#endif
|
||||
|
||||
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
|
||||
if (should_swap && !too_cold) {
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
do_pause_e_move(toolchange_settings.swap_length + toolchange_settings.extra_prime, MMM_TO_MMS(toolchange_settings.prime_speed));
|
||||
do_pause_e_move(toolchange_settings.swap_length, MMM_TO_MMS(toolchange_settings.prime_speed));
|
||||
do_pause_e_move(toolchange_settings.extra_prime, ADVANCED_PAUSE_PURGE_FEEDRATE);
|
||||
#else
|
||||
current_position[E_AXIS] += (toolchange_settings.swap_length + toolchange_settings.extra_prime) / planner.e_factor[tmp_extruder];
|
||||
planner.buffer_line(current_position, MMM_TO_MMS(toolchange_settings.prime_speed), tmp_extruder);
|
||||
current_position[E_AXIS] += toolchange_settings.swap_length / planner.e_factor[new_tool];
|
||||
planner.buffer_line(current_position, MMM_TO_MMS(toolchange_settings.prime_speed), new_tool);
|
||||
current_position[E_AXIS] += toolchange_settings.extra_prime / planner.e_factor[new_tool];
|
||||
planner.buffer_line(current_position, MMM_TO_MMS(toolchange_settings.prime_speed * 0.2f), new_tool);
|
||||
#endif
|
||||
planner.synchronize();
|
||||
planner.set_e_position_mm((destination[E_AXIS] = current_position[E_AXIS] = current_position[E_AXIS] - (TOOLCHANGE_FIL_EXTRA_PRIME)));
|
||||
@@ -989,7 +992,7 @@ void tool_change(const uint8_t tmp_extruder, bool no_move/*=false*/) {
|
||||
// If the original position is within tool store area, go to X origin at once
|
||||
if (destination[Y_AXIS] < SWITCHING_TOOLHEAD_Y_POS + SWITCHING_TOOLHEAD_Y_CLEAR) {
|
||||
current_position[X_AXIS] = 0;
|
||||
planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[X_AXIS], active_extruder);
|
||||
planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[X_AXIS], new_tool);
|
||||
planner.synchronize();
|
||||
}
|
||||
#else
|
||||
@@ -1022,14 +1025,14 @@ void tool_change(const uint8_t tmp_extruder, bool no_move/*=false*/) {
|
||||
#endif
|
||||
|
||||
#if ENABLED(PRUSA_MMU2)
|
||||
mmu2.tool_change(tmp_extruder);
|
||||
mmu2.tool_change(new_tool);
|
||||
#endif
|
||||
|
||||
#if SWITCHING_NOZZLE_TWO_SERVOS
|
||||
lower_nozzle(active_extruder);
|
||||
lower_nozzle(new_tool);
|
||||
#endif
|
||||
|
||||
} // (tmp_extruder != active_extruder)
|
||||
} // (new_tool != old_tool)
|
||||
|
||||
planner.synchronize();
|
||||
|
||||
@@ -1039,8 +1042,8 @@ void tool_change(const uint8_t tmp_extruder, bool no_move/*=false*/) {
|
||||
#endif
|
||||
|
||||
#if ENABLED(MK2_MULTIPLEXER)
|
||||
if (tmp_extruder >= E_STEPPERS) return invalid_extruder_error(tmp_extruder);
|
||||
select_multiplexed_stepper(tmp_extruder);
|
||||
if (new_tool >= E_STEPPERS) return invalid_extruder_error(new_tool);
|
||||
select_multiplexed_stepper(new_tool);
|
||||
#endif
|
||||
|
||||
#if DO_SWITCH_EXTRUDER
|
||||
|
||||
@@ -117,7 +117,7 @@ inline void report_pin_state_extended(pin_t pin, bool ignore, bool extended = fa
|
||||
if (GET_ARRAY_PIN(x) == pin) {
|
||||
if (found) multi_name_pin = true;
|
||||
found = true;
|
||||
if (!multi_name_pin) { // report digitial and analog pin number only on the first time through
|
||||
if (!multi_name_pin) { // report digital and analog pin number only on the first time through
|
||||
sprintf_P(buffer, PSTR("%sPIN: "), start_string); // digital pin number
|
||||
SERIAL_ECHO(buffer);
|
||||
PRINT_PIN(pin);
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
//
|
||||
// USB connect control
|
||||
//
|
||||
#define USB_CONNECT PC13
|
||||
#define USB_CONNECT_PIN PC13
|
||||
#define USB_CONNECT_INVERTING false
|
||||
|
||||
#define SD_DETECT_PIN PC4
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#ifndef TARGET_STM32F1
|
||||
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
|
||||
@@ -102,7 +103,7 @@
|
||||
//
|
||||
// USB connect control
|
||||
//
|
||||
#define USB_CONNECT PC13
|
||||
#define USB_CONNECT_PIN PC13
|
||||
#define USB_CONNECT_INVERTING false
|
||||
|
||||
#define SD_DETECT_PIN PC4
|
||||
|
||||
@@ -16,34 +16,42 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* ALFAWISE U30 (STM32F103VET6) board pin assignments
|
||||
* Longer3D LK1/LK2 & Alfawise U20/U30 (STM32F103VET6) board pin assignments
|
||||
*/
|
||||
|
||||
#if !defined(__STM32F1__) && !defined(STM32F1xx)
|
||||
#error "Oops! Select a STM32F1 board in 'Tools > Board.'"
|
||||
#elif HOTENDS > 1 || E_STEPPERS > 1
|
||||
#error "LONGER3D only supports 1 hotend / E-stepper. Comment out this line to continue."
|
||||
#error "Longer3D board only supports 1 hotend / E-stepper. Comment out this line to continue."
|
||||
#endif
|
||||
|
||||
#define BOARD_NAME "Longer3D"
|
||||
#define ALFAWISE_UX0 // Common to all Alfawise STM32F1 boards
|
||||
#define ALFAWISE_UX0 // Common to all Longer3D STM32F1 boards (used for Open drain mosfets)
|
||||
|
||||
//#define DISABLE_DEBUG // We still want to debug with STLINK...
|
||||
#define DISABLE_JTAG // We free the jtag pins (PA15) but keep STLINK
|
||||
// Release PB4 (STEP_X_PIN) from JTAG NRST role.
|
||||
//#define DISABLE_DEBUG // > Hobi : We still want to debug with STLINK...
|
||||
#define DISABLE_JTAG // we free the jtag pins (PA15) but keep STLINK
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#define X_STOP_PIN PC1 // pin 16
|
||||
//#define X_MAX_PIN PC0 // pin 15 Used as filament sensor on Alfawise setup
|
||||
#define X_MIN_PIN PC1 // pin 16
|
||||
#define X_MAX_PIN PC0 // pin 15 (Filament sensor on Alfawise setup)
|
||||
#define Y_MIN_PIN PC15 // pin 9
|
||||
//#define Y_MAX_PIN PC14 // pin 8 Unused in stock Alfawise setup
|
||||
#define Y_MAX_PIN PC14 // pin 8 (Unused in stock Alfawise setup)
|
||||
#define Z_MIN_PIN PE6 // pin 5 Standard Endstop or Z_Probe endstop function
|
||||
//#define Z_MAX_PIN PE5 // pin 4 Unused in stock Alfawise setup
|
||||
#define Z_MAX_PIN PE5 // pin 4 (Unused in stock Alfawise setup)
|
||||
// May be used for BLTouch Servo function on older variants (<= V08)
|
||||
|
||||
//
|
||||
// Filament Sensor
|
||||
//
|
||||
#ifndef FIL_RUNOUT_PIN
|
||||
#define FIL_RUNOUT_PIN PC0 // XMAX plug on PCB used as filament runout sensor on Alfawise boards (inverting true)
|
||||
#endif
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
@@ -78,12 +86,7 @@
|
||||
#define FAN_PIN PA15 // pin 77 (4cm Fan)
|
||||
#define FAN_SOFT_PWM // Required to avoid issues with heating or STLink
|
||||
#define FAN_MIN_PWM 35 // Fan will not start in 1-30 range
|
||||
#define FAN_MAX_PWM 255
|
||||
|
||||
// Filament Sensor
|
||||
#ifndef FIL_RUNOUT_PIN
|
||||
#define FIL_RUNOUT_PIN PC0 // XMAX plug on PCB used as filament runout sensor on Alfawise boards (inverting true)
|
||||
#endif
|
||||
#define FAN_MAX_PWM 255
|
||||
|
||||
//#define BEEPER_PIN PD13 // pin 60 (Servo PWM output 5V/GND on Board V0G+) made for BL-Touch sensor
|
||||
// Can drive a PC Buzzer, if connected between PWM and 5V pins
|
||||
@@ -93,17 +96,14 @@
|
||||
//
|
||||
// PWM
|
||||
//
|
||||
//#define NUM_SERVOS 1
|
||||
//#define SERVO0_TIMER_NUM 1 // General or Adv. timer to use for the servo PWM (2 & 5 are reserved)
|
||||
|
||||
#define SERVO0_PWM_OD
|
||||
#define SERVO0_PIN PD13 // Open drain PWM pin on the V0G (GND or floating 5V)
|
||||
#define SERVO0_PWM_OD // Comment this if using PE5
|
||||
|
||||
//#define SERVO0_PIN PE5 // Pulled up PWM pin on the V08 (3.3V or 0)
|
||||
//#define SERVO0_PIN PE5 // Pulled up PWM pin on the V08 (3.3V or 0)
|
||||
|
||||
/**
|
||||
* Note: Alfawise screens use various TFT controllers. Supported screens
|
||||
* are based on the ILI9342, ILI9328 and ST7798V. Define init sequences for
|
||||
* are based on the ILI9341, ILI9328 and ST7798V. Define init sequences for
|
||||
* other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
|
||||
*
|
||||
* If the screen stays white, disable 'LCD_RESET_PIN' to let the bootloader
|
||||
@@ -112,7 +112,6 @@
|
||||
* Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu
|
||||
* because Marlin uses the reset as a failsafe to revive a glitchy LCD.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#define LCD_RESET_PIN PC4 // pin 33
|
||||
#define LCD_BACKLIGHT_PIN PD12 // pin 59
|
||||
@@ -123,8 +122,8 @@
|
||||
#define FSMC_DMA_DEV DMA2
|
||||
#define FSMC_DMA_CHANNEL DMA_CH5
|
||||
|
||||
#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h
|
||||
#define DOGLCD_SCK -1
|
||||
#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h
|
||||
#define DOGLCD_SCK -1
|
||||
|
||||
/**
|
||||
* Note: Alfawise U20/U30 boards DON'T use SPI2, as the hardware designer
|
||||
@@ -146,13 +145,12 @@
|
||||
//
|
||||
// SPI1 (EEPROM W25Q64 + DAC OUT)
|
||||
//
|
||||
|
||||
#undef E2END
|
||||
#define E2END 0x7FF // EEPROM end address (reserve 2kB on sd/sram, real spi one is 8MB/64Mbits)
|
||||
#define E2END 0x7FF // EEPROM end address (reserve 2kB on sd/sram, real spi one is 8MB/64Mbits)
|
||||
/*
|
||||
#define SPI_EEPROM 1 // If commented this will create a file on the SD card as a replacement
|
||||
#define SPI_CHAN_EEPROM1 1
|
||||
#define SPI_EEPROM1_CS PC5 // pin 34
|
||||
#define SPI_EEPROM 1 // If commented this will create a file on the SD card as a replacement
|
||||
#define SPI_CHAN_EEPROM1 1
|
||||
#define SPI_EEPROM1_CS PC5 // pin 34
|
||||
|
||||
//#define EEPROM_SCK BOARD_SPI1_SCK_PIN // PA5 pin 30
|
||||
//#define EEPROM_MISO BOARD_SPI1_MISO_PIN // PA6 pin 31
|
||||
|
||||
@@ -35,9 +35,9 @@
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
#define X_MIN_PIN 38 // PD8 X_STOP
|
||||
#define X_MIN_PIN 38 // PD8 X_STOP
|
||||
#define X_MAX_PIN -1
|
||||
#define Y_MIN_PIN 39 // PD9 Y_STOP
|
||||
#define Y_MIN_PIN 39 // PD9 Y_STOP
|
||||
#define Y_MAX_PIN -1
|
||||
#define Z_MIN_PIN 40 // PD10 Z_STOP
|
||||
#define Z_MAX_PIN -1
|
||||
|
||||
@@ -2144,8 +2144,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
@@ -2434,6 +2434,7 @@
|
||||
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
|
||||
// connector at: right=0 bottom=-90 top=90 left=180
|
||||
//#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
|
||||
//#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side
|
||||
|
||||
/**
|
||||
* Sample debug features
|
||||
|
||||
@@ -2175,8 +2175,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
@@ -2436,6 +2436,7 @@
|
||||
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
|
||||
// connector at: right=0 bottom=-90 top=90 left=180
|
||||
//#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
|
||||
//#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side
|
||||
|
||||
/**
|
||||
* Sample debug features
|
||||
|
||||
@@ -2164,8 +2164,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
@@ -2434,6 +2434,7 @@
|
||||
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
|
||||
// connector at: right=0 bottom=-90 top=90 left=180
|
||||
//#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
|
||||
//#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side
|
||||
|
||||
/**
|
||||
* Sample debug features
|
||||
|
||||
@@ -1619,8 +1619,11 @@
|
||||
// Middle point of circle
|
||||
#define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
|
||||
|
||||
// Moves the nozzle to the initial position
|
||||
// Move the nozzle to the initial position after cleaning
|
||||
#define NOZZLE_CLEAN_GOBACK
|
||||
|
||||
// Enable for a purge/clean station that's always at the gantry height (thus no Z move)
|
||||
//#define NOZZLE_CLEAN_NO_Z
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -2123,7 +2126,7 @@
|
||||
#define MKS_ROBIN_TFT
|
||||
|
||||
//=============================================================================
|
||||
//============================= SPI Touch Screens =============================
|
||||
//============================ Other Controllers ============================
|
||||
//=============================================================================
|
||||
|
||||
#define TOUCH_BUTTONS
|
||||
@@ -2147,14 +2150,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
//============================ Other Controllers ============================
|
||||
//=============================================================================
|
||||
|
||||
//
|
||||
// CONTROLLER TYPE: Keypad / Add-on
|
||||
//
|
||||
|
||||
//
|
||||
// RepRapWorld REPRAPWORLD_KEYPAD v1.1
|
||||
// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
|
||||
@@ -2249,8 +2244,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
@@ -1335,7 +1335,7 @@
|
||||
// The number of linear motions that can be in the plan at any give time.
|
||||
// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
|
||||
#if ENABLED(SDSUPPORT)
|
||||
#define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
|
||||
#define BLOCK_BUFFER_SIZE 32 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
|
||||
#else
|
||||
#define BLOCK_BUFFER_SIZE 16 // maximize block buffer
|
||||
#endif
|
||||
@@ -1344,7 +1344,7 @@
|
||||
|
||||
// The ASCII buffer for serial input
|
||||
#define MAX_CMD_SIZE 96
|
||||
#define BUFSIZE 4
|
||||
#define BUFSIZE 8
|
||||
|
||||
// Transmission to Host Buffer Size
|
||||
// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0.
|
||||
@@ -2437,6 +2437,7 @@
|
||||
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
|
||||
// connector at: right=0 bottom=-90 top=90 left=180
|
||||
//#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
|
||||
//#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side
|
||||
|
||||
/**
|
||||
* Sample debug features
|
||||
|
||||
@@ -2144,8 +2144,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
@@ -2155,8 +2155,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
@@ -2436,6 +2436,7 @@
|
||||
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
|
||||
// connector at: right=0 bottom=-90 top=90 left=180
|
||||
//#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
|
||||
//#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side
|
||||
|
||||
/**
|
||||
* Sample debug features
|
||||
|
||||
@@ -2146,8 +2146,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
@@ -2434,6 +2434,7 @@
|
||||
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
|
||||
// connector at: right=0 bottom=-90 top=90 left=180
|
||||
//#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
|
||||
//#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side
|
||||
|
||||
/**
|
||||
* Sample debug features
|
||||
|
||||
@@ -2146,8 +2146,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
@@ -2434,6 +2434,7 @@
|
||||
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
|
||||
// connector at: right=0 bottom=-90 top=90 left=180
|
||||
//#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
|
||||
//#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side
|
||||
|
||||
/**
|
||||
* Sample debug features
|
||||
|
||||
@@ -2297,8 +2297,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
@@ -2434,6 +2434,7 @@
|
||||
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
|
||||
// connector at: right=0 bottom=-90 top=90 left=180
|
||||
//#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
|
||||
//#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side
|
||||
|
||||
/**
|
||||
* Sample debug features
|
||||
|
||||
@@ -2159,8 +2159,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
@@ -2434,6 +2434,7 @@
|
||||
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
|
||||
// connector at: right=0 bottom=-90 top=90 left=180
|
||||
//#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
|
||||
//#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side
|
||||
|
||||
/**
|
||||
* Sample debug features
|
||||
|
||||
@@ -2155,8 +2155,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
@@ -2434,6 +2434,7 @@
|
||||
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
|
||||
// connector at: right=0 bottom=-90 top=90 left=180
|
||||
//#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
|
||||
//#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side
|
||||
|
||||
/**
|
||||
* Sample debug features
|
||||
|
||||
@@ -2156,8 +2156,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
@@ -2434,6 +2434,7 @@
|
||||
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
|
||||
// connector at: right=0 bottom=-90 top=90 left=180
|
||||
//#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
|
||||
//#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side
|
||||
|
||||
/**
|
||||
* Sample debug features
|
||||
|
||||
@@ -2154,8 +2154,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
@@ -2434,6 +2434,7 @@
|
||||
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
|
||||
// connector at: right=0 bottom=-90 top=90 left=180
|
||||
//#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
|
||||
//#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side
|
||||
|
||||
/**
|
||||
* Sample debug features
|
||||
|
||||
@@ -2145,8 +2145,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
@@ -2438,6 +2438,7 @@
|
||||
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
|
||||
// connector at: right=0 bottom=-90 top=90 left=180
|
||||
//#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
|
||||
//#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side
|
||||
|
||||
/**
|
||||
* Sample debug features
|
||||
|
||||
@@ -2144,8 +2144,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
@@ -2144,8 +2144,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
@@ -2434,6 +2434,7 @@
|
||||
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
|
||||
// connector at: right=0 bottom=-90 top=90 left=180
|
||||
//#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
|
||||
//#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side
|
||||
|
||||
/**
|
||||
* Sample debug features
|
||||
|
||||
@@ -2144,8 +2144,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
@@ -2434,6 +2434,7 @@
|
||||
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
|
||||
// connector at: right=0 bottom=-90 top=90 left=180
|
||||
//#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
|
||||
//#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side
|
||||
|
||||
/**
|
||||
* Sample debug features
|
||||
|
||||
@@ -2132,8 +2132,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
@@ -2434,6 +2434,7 @@
|
||||
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
|
||||
// connector at: right=0 bottom=-90 top=90 left=180
|
||||
//#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
|
||||
//#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side
|
||||
|
||||
/**
|
||||
* Sample debug features
|
||||
|
||||
@@ -2144,8 +2144,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
@@ -2442,6 +2442,7 @@
|
||||
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
|
||||
// connector at: right=0 bottom=-90 top=90 left=180
|
||||
//#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
|
||||
//#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side
|
||||
|
||||
/**
|
||||
* Sample debug features
|
||||
|
||||
@@ -2132,8 +2132,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
@@ -2434,6 +2434,7 @@
|
||||
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
|
||||
// connector at: right=0 bottom=-90 top=90 left=180
|
||||
//#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
|
||||
//#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side
|
||||
|
||||
/**
|
||||
* Sample debug features
|
||||
|
||||
@@ -2143,8 +2143,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
@@ -2434,6 +2434,7 @@
|
||||
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
|
||||
// connector at: right=0 bottom=-90 top=90 left=180
|
||||
//#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
|
||||
//#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side
|
||||
|
||||
/**
|
||||
* Sample debug features
|
||||
|
||||
@@ -2154,8 +2154,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
@@ -2437,6 +2437,7 @@
|
||||
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
|
||||
// connector at: right=0 bottom=-90 top=90 left=180
|
||||
//#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
|
||||
//#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side
|
||||
|
||||
/**
|
||||
* Sample debug features
|
||||
|
||||
@@ -2145,8 +2145,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
@@ -2434,6 +2434,7 @@
|
||||
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
|
||||
// connector at: right=0 bottom=-90 top=90 left=180
|
||||
//#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
|
||||
//#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side
|
||||
|
||||
/**
|
||||
* Sample debug features
|
||||
|
||||
@@ -2147,8 +2147,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
@@ -2434,6 +2434,7 @@
|
||||
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
|
||||
// connector at: right=0 bottom=-90 top=90 left=180
|
||||
//#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
|
||||
//#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side
|
||||
|
||||
/**
|
||||
* Sample debug features
|
||||
|
||||
@@ -2163,8 +2163,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
@@ -2434,6 +2434,7 @@
|
||||
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
|
||||
// connector at: right=0 bottom=-90 top=90 left=180
|
||||
//#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
|
||||
//#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side
|
||||
|
||||
/**
|
||||
* Sample debug features
|
||||
|
||||
@@ -2141,8 +2141,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
@@ -2434,6 +2434,7 @@
|
||||
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
|
||||
// connector at: right=0 bottom=-90 top=90 left=180
|
||||
//#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
|
||||
//#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side
|
||||
|
||||
/**
|
||||
* Sample debug features
|
||||
|
||||
@@ -2141,8 +2141,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
@@ -2434,6 +2434,7 @@
|
||||
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
|
||||
// connector at: right=0 bottom=-90 top=90 left=180
|
||||
//#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
|
||||
//#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side
|
||||
|
||||
/**
|
||||
* Sample debug features
|
||||
|
||||
@@ -2154,8 +2154,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
@@ -2434,6 +2434,7 @@
|
||||
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
|
||||
// connector at: right=0 bottom=-90 top=90 left=180
|
||||
//#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
|
||||
//#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side
|
||||
|
||||
/**
|
||||
* Sample debug features
|
||||
|
||||
@@ -2148,8 +2148,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
@@ -2434,6 +2434,7 @@
|
||||
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
|
||||
// connector at: right=0 bottom=-90 top=90 left=180
|
||||
//#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
|
||||
//#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side
|
||||
|
||||
/**
|
||||
* Sample debug features
|
||||
|
||||
@@ -2148,8 +2148,10 @@
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||
//#define NEOPIXEL2_PIN 5
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user