@@ -65,9 +65,9 @@ static const PROGMEM byte glyph2[] = {0xc8, 0x2f, 0x6a, 0x2e, 0xc8}; //symbol fo
6565static const PROGMEM byte glyph3[] = {0x44 , 0x28 , 0xfe , 0x6c , 0x28 }; // bluetooth-symbol check this out: http://www.carlos-rodrigues.com/projects/pcd8544/
6666
6767unsigned long show_important_info_until = 0 ;
68- void display_show_important_info (const char *str, int duration_secs)
69- {
7068#if (DISPLAY_TYPE & DISPLAY_TYPE_NOKIA)
69+ static void prepare_important_info (int duration_secs)
70+ {
7171 unsigned long seconds = 2 ;
7272 if (duration_secs)
7373 seconds = duration_secs;
@@ -81,10 +81,26 @@ void display_show_important_info(const char *str, int duration_secs)
8181 // TODO: Implement and test 4bit display mode
8282 lcd.clear ();
8383 lcd.setCursor (0 , 2 );
84+ }
85+ #endif
86+
87+ void display_show_important_info (const char *str, int duration_secs)
88+ {
89+ #if (DISPLAY_TYPE & DISPLAY_TYPE_NOKIA)
90+ prepare_important_info (duration_secs);
91+ lcd.print (str);
92+ #endif
93+ }
94+
95+ void display_show_important_info (const __FlashStringHelper *str, int duration_secs)
96+ {
97+ #if (DISPLAY_TYPE & DISPLAY_TYPE_NOKIA)
98+ prepare_important_info (duration_secs);
8499 lcd.print (str);
85100#endif
86101}
87102
103+
88104// Calculate length of number.
89105// Don't use sprintf() here is it sucks up 1.5kb of code space.
90106static byte calc_number_length (const unsigned long x)
@@ -106,7 +122,7 @@ static byte calc_number_length(const unsigned long x)
106122
107123void display_show_welcome_msg ()
108124{
109- display_show_important_info (msg_welcome, 5 );
125+ display_show_important_info (FROM_FLASH ( msg_welcome) , 5 );
110126
111127#if (DISPLAY_TYPE & DISPLAY_TYPE_NOKIA)
112128 lcd.setCursor (0 , 5 );
@@ -266,7 +282,7 @@ static void display_nokia_menu()
266282 else
267283 lcd.print (MY_F (" " ));
268284
269- lcd.print (reinterpret_cast < const __FlashStringHelper *>( item->get_name ()));
285+ lcd.print (FROM_FLASH (( item->get_name () )));
270286
271287 ++current_lcd_row;
272288 if (current_lcd_row == nokia_screen_rows)
0 commit comments