OSDN Git Service

[UI][Help][v2.0] Add version string and copyright.
authorK.Ohta <whatisthis.sowhat@gmail.com>
Wed, 11 Sep 2013 17:17:48 +0000 (02:17 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Wed, 11 Sep 2013 17:17:48 +0000 (02:17 +0900)
helps.c
nbproject/Makefile-genesis.properties

diff --git a/helps.c b/helps.c
index 4df3c42..0600286 100644 (file)
--- a/helps.c
+++ b/helps.c
@@ -46,13 +46,12 @@ const char *userfreq_helpstr[10] = {
         "E: Backlight", "F: (Exit) Help",
     };
 
-const char *updown_helpstr[18] = {
-        "5: Menu", " ",
+const char *updown_helpstr[16] = {
+        "5: Menu", "0: Narrow/Broad",
         "1: Slow Down", "3: Slow Up",
         "4: Down", "6: Up",
         "7: Fast Down", "9: Fast Up",
         "2: Band Down", "8: Band Up",
-        "0: Narrow/Broad", " ",
         "A: AM/FM", "B: User freq",
         "C Scan", "D: Stereo mode",
         "E: Backlight", "F: (Exit) Help",
@@ -70,28 +69,45 @@ const char *setup_helpstr[14] = {
 
 const char *mainmenu_helpstr[14] = {
         "0: Setup", "1: Band",
-        "3: Freq", " "
+        "2:Resv", "3: Freq",
         "4: Call user", "6: Set user",
         "7: Power Off", "8: Volume",
-        "9: Width", "a: AM/FM",
-        "b: Cancel","c: Set user",
-        "d: Input user","f: (Exit) Help",
+        "9: Reload", "A: AM/FM",
+        "B: Cancel","C: Set user",
+        "D: Input user","F: (Exit) Help",
 };
 
-const char *numeric_helpstr[10] = {
-     "On numeric input", " ",
-    "0-9: Numeric", "f: enter",
-    "a: Delete", "b: Reset value",
-    "d: Left", "e: Right",
-    "Press any key", " to continue."
+const char *numeric_helpstr[8] = {
+     "On numeric", "input",
+    "0-9: Numeric", "F: enter",
+    "A: Delete", "B: Reset value",
+    "D: Left", "E: Right",
 };
 
+const char *version_helpstr[8] = {
+    "Open I2C Radio", "V2.00pre",
+    "(C) 2013", "Kyuma Ohta",
+    "Licensed under", "GPLv2+LE",
+    "Press any key", " to continue.",
+};
 
 static unsigned char help_header(void)
 {
     return printhelp_2lines("Help", "F=exit any=continue");
 }
 
+static unsigned char help_version(void)
+{
+    unsigned char c;
+    unsigned char i;
+    for(i = 0; i < 8; i += 2){
+        c = printhelp_2lines(version_helpstr[i], version_helpstr[i + 1]);
+        if(c == charcode_f) return c;
+    }
+    return help_header();
+}
+
+
 void setup_help(void)
 {
     unsigned char c;
@@ -105,7 +121,7 @@ void setup_help(void)
         if(l >= 14) {
             c = numeric_help();
             if(c == charcode_f) return;
-            if(help_header() == charcode_f) return;
+            if(help_version() == charcode_f) return;
             l = 0;
         }
     } while(1);
@@ -132,7 +148,7 @@ unsigned char numeric_help(void)
         c = printhelp_2lines(numeric_helpstr[l], numeric_helpstr[l + 1]);
         if(c == charcode_f) return charcode_f;
         l += 2;
-    } while(l < 10);
+    } while(l < 8);
     return c;
 }
 
@@ -142,6 +158,7 @@ void mainmenu_help(void)
 
     char l;
     l = 0;
+    if(help_header() == charcode_f) return;
     do {
         c = printhelp_2lines(mainmenu_helpstr[l], mainmenu_helpstr[l + 1]);
         if(c == charcode_f) return;
@@ -149,6 +166,7 @@ void mainmenu_help(void)
         if(l >= 14) {
             c = numeric_help();
             if(c == charcode_f) return;
+            if(help_version() == charcode_f) return;
             l = 0;
         }
     } while(1);
@@ -165,10 +183,10 @@ void updown_help(void)
         c = printhelp_2lines(updown_helpstr[l], updown_helpstr[l + 1]);
         if(c == charcode_f) return;
         l += 2;
-        if(l >= 18) {
+        if(l >= 16) {
             c = numeric_help();
             if(c == charcode_f) return;
-           if(help_header() == charcode_f) return;
+           if(help_version() == charcode_f) return;
             l = 0;
         }
     } while(1);
@@ -189,7 +207,7 @@ void userfreq_help(void)
         if(l >= 16) {
             c = numeric_help();
             if(c == charcode_f) return;
-            if(help_header() == charcode_f) return;
+            if(help_version() == charcode_f) return;
             l = 0;
         }
     } while(1);
index 27da133..ef57cae 100644 (file)
@@ -1,5 +1,5 @@
 #
-#Thu Sep 12 00:34:49 JST 2013
+#Thu Sep 12 02:08:08 JST 2013
 default.languagetoolchain.dir=/opt/microchip/xc8/v1.20/bin
 com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=1c49f19f6a43b876c317e0d8d41c0854
 default.languagetoolchain.version=1.20