OSDN Git Service

[USERBAND][v2.0] Save userbands on poweroff/save.
authorK.Ohta <whatisthis.sowhat@gmail.com>
Wed, 25 Sep 2013 00:47:26 +0000 (09:47 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Wed, 25 Sep 2013 00:47:26 +0000 (09:47 +0900)
menu_setup.c
menu_userband.c

index 1755f54..c34ea8c 100644 (file)
@@ -38,6 +38,7 @@ void menu_save(void)
     c = printhelp_2lines("Save settings", "A=Yes");
     if(c == charcode_a) {
         save_eeprom();
+        save_userbands();
     }
 }
 
@@ -47,6 +48,7 @@ void menu_load(void)
     c = printhelp_2lines("Load settings", "A=Yes B=Init");
     if(c == charcode_a) {
         c = load_eeprom();
+        load_userbands();
         if( c != 0xff) {
             _CLS();
             _LOCATE(0,0);
@@ -54,6 +56,7 @@ void menu_load(void)
             setdefault();
             if(c == charcode_a){
                 save_eeprom();
+               save_userbands();
             }
         }
         setup_akc6955();
index 49fcb1a..ebc2438 100644 (file)
@@ -172,7 +172,9 @@ void input_userband(void)
             if(d < 0) format_userbands();
 
         } else {
-            c = c % 10;
+            if(c == charcode_0) {
+              c = 0;
+           }
             _PUTCHAR('0' + c);
             if(setup.fm != 0){
                 setup.fm_userbandnum = c;