Display Class for BaseMachine

Revision:
4:e51a5f0891a0
Parent:
3:5b11261a545a
Child:
5:6264a3682865
--- a/ST7565_SequencerDisplay.h	Tue Aug 23 10:28:44 2016 +0000
+++ b/ST7565_SequencerDisplay.h	Fri Aug 26 05:11:10 2016 +0000
@@ -7,6 +7,8 @@
 #ifndef _ST7565_SEQUENCE_DISPLAY_H_
 #define _ST7565_SEQUENCE_DISPLAY_H_
 
+#define DISPLAY_PARAMS_ON_LCD   (0)
+
 #include "mbed.h"
 #include "SequencerDisplay.h"
 #include "st7565LCD.h"
@@ -69,7 +71,33 @@
                     }
                 }
             }
-        } 
+        }
+        
+        char buff[32];
+        sprintf(buff, "%2d", this->getOctave());
+        gLCD->drawstring(115, 0, "OC");
+        gLCD->drawstring(115, 1, buff);
+        
+        #if (DISPLAY_PARAMS_ON_LCD)    
+        char* s;
+        switch (waveShape) {
+        case 0:
+            s = "SQ";
+            break;
+        case 1:
+            s = "SW";
+            break;
+        }
+        gLCD->drawstring(115, 2, s);
+        
+        gLCD->drawstring(115, 3, "MN");
+        sprintf(buff, "%2d", this->getModNumber());
+        gLCD->drawstring(115, 4, buff);
+        
+        sprintf(buff, "%3d", this->getBpm());
+        gLCD->drawstring(109, 5, "BPM");
+        gLCD->drawstring(109, 6, buff);
+        #endif // DISPLAY_PARAMS_ON_LCD
 
         gLCD->display();
     };