Add support for 0x08 and 0x09 command codes (display a flag dimm/bright) draft

Tue, 10 Nov 2020 22:24:03 +0100

author
David Douard <david.douard@sdf3.org>
date
Tue, 10 Nov 2020 22:24:03 +0100
changeset 52
098124b730eb
parent 51
d8042bff0e00
child 53
74e85b34d26b

Add support for 0x08 and 0x09 command codes (display a flag dimm/bright)

src/main.cpp file | annotate | diff | comparison | revisions
--- a/src/main.cpp	Tue Nov 10 22:22:16 2020 +0100
+++ b/src/main.cpp	Tue Nov 10 22:24:03 2020 +0100
@@ -308,8 +308,6 @@
 	  reset();
 	}
 	if (must_shutdown) {
-		//tdsp.join();
-		//dsp_refresh.detach();
 		must_shutdown = false;
 		dsp->power_off();
 	}
@@ -365,10 +363,6 @@
       }
     }
 
-	// at each loop iteration, send buffered keycodes, if any
-	//if (hp != NULL)
-	//  hp->send_key_when_idle();
-
     if ((hp != NULL) && (hp->cmd_available()))
     {
       if (hp->pop(cmd))
@@ -410,8 +404,14 @@
           if (cmd.value[0] == 0x0E) {
             // clear the Shift flag
             shift = false;
-			dsp->shift_off();
           }
+		  dsp->hide_flag(cmd.value[0]);
+		} else if (cmd.cmd == 0x08) {
+		  // set a flag dimmed
+			dsp->show_flag(cmd.value[0], true, true);
+		} else if (cmd.cmd == 0x09) {
+		  // set a flag bright
+          dsp->set_flag(cmd.value[0], true, false);
         } else if (cmd.cmd == 0x86) {
 			// shutdown
 			dsp->show_byescreen();

mercurial