From 83f167fd7072fe856579c3a52e5c0fdce6836516 Mon Sep 17 00:00:00 2001 From: "K.Ohta" Date: Wed, 25 Sep 2013 09:47:26 +0900 Subject: [PATCH] [USERBAND][v2.0] Save userbands on poweroff/save. --- menu_setup.c | 3 +++ menu_userband.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/menu_setup.c b/menu_setup.c index 1755f54..c34ea8c 100644 --- a/menu_setup.c +++ b/menu_setup.c @@ -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(); diff --git a/menu_userband.c b/menu_userband.c index 49fcb1a..ebc2438 100644 --- a/menu_userband.c +++ b/menu_userband.c @@ -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; -- 2.11.0