mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-30 15:26:18 +00:00
Merge pull request #743 from Opticalworm/Marlin_v1
Improved support for panelolu2 encoder and buzzer
This commit is contained in:
commit
e1ae7952eb
@ -27,9 +27,9 @@ atmega12848m.upload.protocol=stk500
|
|||||||
atmega12848m.upload.maximum_size=131072
|
atmega12848m.upload.maximum_size=131072
|
||||||
atmega12848m.upload.speed=19200
|
atmega12848m.upload.speed=19200
|
||||||
|
|
||||||
atmega12848m.bootloader.low_fuses=0xFD
|
atmega1284.bootloader.low_fuses=0xD6
|
||||||
atmega12848m.bootloader.high_fuses=0x9A
|
atmega1284.bootloader.high_fuses=0xDA
|
||||||
atmega12848m.bootloader.extended_fuses=0xFF
|
atmega1284.bootloader.extended_fuses=0xFD
|
||||||
atmega12848m.bootloader.path=atmega
|
atmega12848m.bootloader.path=atmega
|
||||||
atmega12848m.bootloader.file=ATmegaBOOT_168_atmega1284p_8m.hex
|
atmega12848m.bootloader.file=ATmegaBOOT_168_atmega1284p_8m.hex
|
||||||
atmega12848m.bootloader.unlock_bits=0x3F
|
atmega12848m.bootloader.unlock_bits=0x3F
|
||||||
@ -48,30 +48,8 @@ atmega1284.upload.protocol=stk500
|
|||||||
atmega1284.upload.maximum_size=131072
|
atmega1284.upload.maximum_size=131072
|
||||||
atmega1284.upload.speed=57600
|
atmega1284.upload.speed=57600
|
||||||
|
|
||||||
atmega1284.bootloader.low_fuses=0xFF
|
|
||||||
atmega1284.bootloader.high_fuses=0x9A
|
|
||||||
atmega1284.bootloader.extended_fuses=0xFF
|
|
||||||
atmega1284.bootloader.path=atmega
|
|
||||||
atmega1284.bootloader.file=ATmegaBOOT_168_atmega1284p.hex
|
|
||||||
atmega1284.bootloader.unlock_bits=0x3F
|
|
||||||
atmega1284.bootloader.lock_bits=0x0F
|
|
||||||
|
|
||||||
atmega1284.build.mcu=atmega1284p
|
|
||||||
atmega1284.build.f_cpu=16000000L
|
|
||||||
atmega1284.build.core=arduino
|
|
||||||
atmega1284.build.variant=standard
|
|
||||||
#
|
|
||||||
|
|
||||||
##############################################################
|
|
||||||
|
|
||||||
atmega1284.name=Sanguino W/ ATmega1284p 16mhz ceramic resonator
|
|
||||||
|
|
||||||
atmega1284.upload.protocol=stk500
|
|
||||||
atmega1284.upload.maximum_size=131072
|
|
||||||
atmega1284.upload.speed=57600
|
|
||||||
|
|
||||||
atmega1284.bootloader.low_fuses=0xD6
|
atmega1284.bootloader.low_fuses=0xD6
|
||||||
atmega1284.bootloader.high_fuses=0xDC
|
atmega1284.bootloader.high_fuses=0xDA
|
||||||
atmega1284.bootloader.extended_fuses=0xFD
|
atmega1284.bootloader.extended_fuses=0xFD
|
||||||
atmega1284.bootloader.path=atmega
|
atmega1284.bootloader.path=atmega
|
||||||
atmega1284.bootloader.file=ATmegaBOOT_168_atmega1284p.hex
|
atmega1284.bootloader.file=ATmegaBOOT_168_atmega1284p.hex
|
||||||
@ -82,4 +60,24 @@ atmega1284.build.mcu=atmega1284p
|
|||||||
atmega1284.build.f_cpu=16000000L
|
atmega1284.build.f_cpu=16000000L
|
||||||
atmega1284.build.core=arduino
|
atmega1284.build.core=arduino
|
||||||
atmega1284.build.variant=standard
|
atmega1284.build.variant=standard
|
||||||
|
##############################################################
|
||||||
|
|
||||||
|
atmega1284m.name=Sanguino W/ ATmega1284p 20mhz
|
||||||
|
|
||||||
|
atmega1284m.upload.protocol=stk500
|
||||||
|
atmega1284m.upload.maximum_size=131072
|
||||||
|
atmega1284m.upload.speed=57600
|
||||||
|
|
||||||
|
atmega1284m.bootloader.low_fuses=0xD6
|
||||||
|
atmega1284m.bootloader.high_fuses=0xDA
|
||||||
|
atmega1284m.bootloader.extended_fuses=0xFD
|
||||||
|
atmega1284m.bootloader.path=atmega
|
||||||
|
atmega1284m.bootloader.file=ATmegaBOOT_168_atmega1284p.hex
|
||||||
|
atmega1284m.bootloader.unlock_bits=0x3F
|
||||||
|
atmega1284m.bootloader.lock_bits=0x0F
|
||||||
|
|
||||||
|
atmega1284m.build.mcu=atmega1284p
|
||||||
|
atmega1284m.build.f_cpu=20000000L
|
||||||
|
atmega1284m.build.core=arduino
|
||||||
|
atmega1284m.build.variant=standard
|
||||||
#
|
#
|
||||||
|
@ -451,6 +451,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
|
|||||||
//#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
|
//#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
|
||||||
//#define ULTIMAKERCONTROLLER //as available from the ultimaker online store.
|
//#define ULTIMAKERCONTROLLER //as available from the ultimaker online store.
|
||||||
//#define ULTIPANEL //the ultipanel as on thingiverse
|
//#define ULTIPANEL //the ultipanel as on thingiverse
|
||||||
|
//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
|
||||||
|
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
|
||||||
|
|
||||||
// The MaKr3d Makr-Panel with graphic controller and SD support
|
// The MaKr3d Makr-Panel with graphic controller and SD support
|
||||||
// http://reprap.org/wiki/MaKr3d_MaKrPanel
|
// http://reprap.org/wiki/MaKr3d_MaKrPanel
|
||||||
@ -536,6 +538,21 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
|
|||||||
#define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
|
#define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
|
||||||
#define NEWPANEL
|
#define NEWPANEL
|
||||||
#define ULTIPANEL
|
#define ULTIPANEL
|
||||||
|
|
||||||
|
#ifndef ENCODER_PULSES_PER_STEP
|
||||||
|
#define ENCODER_PULSES_PER_STEP 4
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ENCODER_STEPS_PER_MENU_ITEM
|
||||||
|
#define ENCODER_STEPS_PER_MENU_ITEM 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef LCD_USE_I2C_BUZZER
|
||||||
|
#define LCD_FEEDBACK_FREQUENCY_HZ 1000
|
||||||
|
#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
|
// Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
|
||||||
|
@ -2477,7 +2477,7 @@ void process_commands()
|
|||||||
break;
|
break;
|
||||||
#endif // NUM_SERVOS > 0
|
#endif // NUM_SERVOS > 0
|
||||||
|
|
||||||
#if LARGE_FLASH == true && ( BEEPER > 0 || defined(ULTRALCD) )
|
#if (LARGE_FLASH == true && ( BEEPER > 0 || defined(ULTRALCD) || defined(LCD_USE_I2C_BUZZER)))
|
||||||
case 300: // M300
|
case 300: // M300
|
||||||
{
|
{
|
||||||
int beepS = code_seen('S') ? code_value() : 110;
|
int beepS = code_seen('S') ? code_value() : 110;
|
||||||
@ -2489,7 +2489,9 @@ void process_commands()
|
|||||||
delay(beepP);
|
delay(beepP);
|
||||||
noTone(BEEPER);
|
noTone(BEEPER);
|
||||||
#elif defined(ULTRALCD)
|
#elif defined(ULTRALCD)
|
||||||
lcd_buzz(beepS, beepP);
|
lcd_buzz(beepS, beepP);
|
||||||
|
#elif defined(LCD_USE_I2C_BUZZER)
|
||||||
|
lcd_buzz(beepP, beepS);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -2747,7 +2749,11 @@ void process_commands()
|
|||||||
WRITE(BEEPER,LOW);
|
WRITE(BEEPER,LOW);
|
||||||
delay(3);
|
delay(3);
|
||||||
#else
|
#else
|
||||||
lcd_buzz(1000/6,100);
|
#if !defined(LCD_FEEDBACK_FREQUENCY_HZ) || !defined(LCD_FEEDBACK_FREQUENCY_DURATION_MS)
|
||||||
|
lcd_buzz(1000/6,100);
|
||||||
|
#else
|
||||||
|
lcd_buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS,LCD_FEEDBACK_FREQUENCY_HZ);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -971,6 +971,10 @@
|
|||||||
#undef MOTHERBOARD
|
#undef MOTHERBOARD
|
||||||
#define MOTHERBOARD 6
|
#define MOTHERBOARD 6
|
||||||
#define SANGUINOLOLU_V_1_2
|
#define SANGUINOLOLU_V_1_2
|
||||||
|
|
||||||
|
#if defined(__AVR_ATmega1284P__)
|
||||||
|
#define LARGE_FLASH true
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#if MOTHERBOARD == 6
|
#if MOTHERBOARD == 6
|
||||||
#define KNOWN_BOARD 1
|
#define KNOWN_BOARD 1
|
||||||
|
@ -711,7 +711,11 @@ static void lcd_implementation_drawmenu_sddirectory(uint8_t row, const char* pst
|
|||||||
static void lcd_implementation_quick_feedback()
|
static void lcd_implementation_quick_feedback()
|
||||||
{
|
{
|
||||||
#ifdef LCD_USE_I2C_BUZZER
|
#ifdef LCD_USE_I2C_BUZZER
|
||||||
lcd.buzz(60,1000/6);
|
#if !defined(LCD_FEEDBACK_FREQUENCY_HZ) || !defined(LCD_FEEDBACK_FREQUENCY_DURATION_MS)
|
||||||
|
lcd_buzz(1000/6,100);
|
||||||
|
#else
|
||||||
|
lcd_buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS,LCD_FEEDBACK_FREQUENCY_HZ);
|
||||||
|
#endif
|
||||||
#elif defined(BEEPER) && BEEPER > -1
|
#elif defined(BEEPER) && BEEPER > -1
|
||||||
SET_OUTPUT(BEEPER);
|
SET_OUTPUT(BEEPER);
|
||||||
for(int8_t i=0;i<10;i++)
|
for(int8_t i=0;i<10;i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user