Merge pull request #2139 from DRracer/assist-mode-fixes
Fix sound mode [assist]: encoder clicking indefinitely when MMU wants to
This commit is contained in:
commit
3413d5d486
|
|
@ -3,10 +3,10 @@
|
||||||
#define SOUND_H
|
#define SOUND_H
|
||||||
|
|
||||||
|
|
||||||
#define MSG_SOUND_MODE_LOUD "Sound [loud]"
|
#define MSG_SOUND_MODE_LOUD "Sound [loud]"
|
||||||
#define MSG_SOUND_MODE_ONCE "Sound [once]"
|
#define MSG_SOUND_MODE_ONCE "Sound [once]"
|
||||||
#define MSG_SOUND_MODE_SILENT "Sound [silent]"
|
#define MSG_SOUND_MODE_SILENT "Sound [silent]"
|
||||||
#define MSG_SOUND_MODE_BLIND "Sound [blind]"
|
#define MSG_SOUND_MODE_BLIND "Sound [assist]"
|
||||||
|
|
||||||
|
|
||||||
#define e_SOUND_MODE_NULL 0xFF
|
#define e_SOUND_MODE_NULL 0xFF
|
||||||
|
|
|
||||||
|
|
@ -5909,27 +5909,30 @@ uint8_t choose_menu_P(const char *header, const char *item, const char *last_ite
|
||||||
cursor_pos++;
|
cursor_pos++;
|
||||||
}
|
}
|
||||||
enc_dif = lcd_encoder_diff;
|
enc_dif = lcd_encoder_diff;
|
||||||
|
Sound_MakeSound(e_SOUND_TYPE_EncoderMove);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cursor_pos > 3)
|
if (cursor_pos > 3)
|
||||||
{
|
{
|
||||||
Sound_MakeSound(e_SOUND_TYPE_BlindAlert);
|
|
||||||
cursor_pos = 3;
|
cursor_pos = 3;
|
||||||
if (first < items_no - 3)
|
if (first < items_no - 3)
|
||||||
{
|
{
|
||||||
first++;
|
first++;
|
||||||
lcd_clear();
|
lcd_clear();
|
||||||
|
} else { // here we are at the very end of the list
|
||||||
|
Sound_MakeSound(e_SOUND_TYPE_BlindAlert);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cursor_pos < 1)
|
if (cursor_pos < 1)
|
||||||
{
|
{
|
||||||
Sound_MakeSound(e_SOUND_TYPE_BlindAlert);
|
|
||||||
cursor_pos = 1;
|
cursor_pos = 1;
|
||||||
if (first > 0)
|
if (first > 0)
|
||||||
{
|
{
|
||||||
first--;
|
first--;
|
||||||
lcd_clear();
|
lcd_clear();
|
||||||
|
} else { // here we are at the very end of the list
|
||||||
|
Sound_MakeSound(e_SOUND_TYPE_BlindAlert);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -5959,7 +5962,6 @@ uint8_t choose_menu_P(const char *header, const char *item, const char *last_ite
|
||||||
lcd_print(" ");
|
lcd_print(" ");
|
||||||
lcd_set_cursor(0, cursor_pos);
|
lcd_set_cursor(0, cursor_pos);
|
||||||
lcd_print(">");
|
lcd_print(">");
|
||||||
Sound_MakeSound(e_SOUND_TYPE_EncoderMove);
|
|
||||||
_delay(100);
|
_delay(100);
|
||||||
|
|
||||||
if (lcd_clicked())
|
if (lcd_clicked())
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue