add old delay
This commit is contained in:
parent
4058cd144b
commit
9592460281
@ -8078,24 +8078,6 @@ void delay_keep_alive(unsigned int ms)
|
||||
}
|
||||
}
|
||||
|
||||
void delay_keep_alive_no_lcd_update(unsigned int ms)
|
||||
{
|
||||
for (;;) {
|
||||
manage_heater();
|
||||
// Manage inactivity, but don't disable steppers on timeout.
|
||||
manage_inactivity(true);
|
||||
if (ms == 0)
|
||||
break;
|
||||
else if (ms >= 50) {
|
||||
_delay(50);
|
||||
ms -= 50;
|
||||
} else {
|
||||
_delay(ms);
|
||||
ms = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void wait_for_heater(long codenum, uint8_t extruder) {
|
||||
|
||||
#ifdef TEMP_RESIDENCY_TIME
|
||||
|
@ -66,12 +66,12 @@ void Sound_MakeCustom(uint16_t ms,uint16_t tone_,bool critical){
|
||||
if (eSoundMode != e_SOUND_MODE_SILENT){
|
||||
if(!tone_){
|
||||
WRITE(BEEPER, HIGH);
|
||||
delay_keep_alive_no_lcd_update(ms);
|
||||
delayMicroseconds(ms);
|
||||
WRITE(BEEPER, LOW);
|
||||
}
|
||||
else{
|
||||
_tone(BEEPER, tone_);
|
||||
delay_keep_alive_no_lcd_update(ms);
|
||||
delayMicroseconds(ms);
|
||||
_noTone(BEEPER);
|
||||
}
|
||||
}
|
||||
@ -79,13 +79,13 @@ void Sound_MakeCustom(uint16_t ms,uint16_t tone_,bool critical){
|
||||
else{
|
||||
if(!tone_){
|
||||
WRITE(BEEPER, HIGH);
|
||||
delay_keep_alive_no_lcd_update(ms);
|
||||
delayMicroseconds(ms);
|
||||
WRITE(BEEPER, LOW);
|
||||
delay_keep_alive_no_lcd_update(100);
|
||||
delayMicroseconds(100);
|
||||
}
|
||||
else{
|
||||
_tone(BEEPER, tone_);
|
||||
delay_keep_alive_no_lcd_update(ms);
|
||||
delayMicroseconds(ms);
|
||||
_noTone(BEEPER);
|
||||
}
|
||||
}
|
||||
@ -97,7 +97,7 @@ switch(eSoundMode)
|
||||
{
|
||||
case e_SOUND_MODE_LOUD:
|
||||
if(eSoundType==e_SOUND_TYPE_ButtonEcho)
|
||||
delay_keep_alive_no_lcd_update();
|
||||
Sound_DoSound_Echo();
|
||||
if(eSoundType==e_SOUND_TYPE_StandardPrompt)
|
||||
Sound_DoSound_Prompt();
|
||||
if(eSoundType==e_SOUND_TYPE_StandardAlert)
|
||||
@ -135,9 +135,9 @@ switch(eSoundMode)
|
||||
static void Sound_DoSound_Blind_Alert(void)
|
||||
{
|
||||
_tone(BEEPER,100);
|
||||
delay_keep_alive_no_lcd_update(50);
|
||||
delayMicroseconds(50);
|
||||
_noTone(BEEPER);
|
||||
delay_keep_alive_no_lcd_update(200);
|
||||
delayMicroseconds(200);
|
||||
}
|
||||
|
||||
static void Sound_DoSound_Encoder_Move(void)
|
||||
@ -147,9 +147,9 @@ uint8_t nI;
|
||||
for(nI=0;nI<5;nI++)
|
||||
{
|
||||
WRITE(BEEPER,HIGH);
|
||||
delay_keep_alive_no_lcd_update(75);
|
||||
delayMicroseconds(75);
|
||||
WRITE(BEEPER,LOW);
|
||||
delay_keep_alive_no_lcd_update(75);
|
||||
delayMicroseconds(75);
|
||||
}
|
||||
}
|
||||
|
||||
@ -160,16 +160,16 @@ uint8_t nI;
|
||||
for(nI=0;nI<10;nI++)
|
||||
{
|
||||
WRITE(BEEPER,HIGH);
|
||||
delay_keep_alive_no_lcd_update(100);
|
||||
delayMicroseconds(100);
|
||||
WRITE(BEEPER,LOW);
|
||||
delay_keep_alive_no_lcd_update(100);
|
||||
delayMicroseconds(100);
|
||||
}
|
||||
}
|
||||
|
||||
static void Sound_DoSound_Prompt(void)
|
||||
{
|
||||
WRITE(BEEPER,HIGH);
|
||||
delay_keep_alive_no_lcd_update(500);
|
||||
delayMicroseconds(500);
|
||||
WRITE(BEEPER,LOW);
|
||||
}
|
||||
|
||||
@ -181,8 +181,8 @@ nMax=bOnce?1:3;
|
||||
for(nI=0;nI<nMax;nI++)
|
||||
{
|
||||
WRITE(BEEPER,HIGH);
|
||||
delay_keep_alive_no_lcd_update(200);
|
||||
delayMicroseconds(200);
|
||||
WRITE(BEEPER,LOW);
|
||||
delay_keep_alive_no_lcd_update(500);
|
||||
delayMicroseconds(500);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user