Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: SequencerDisplay.h
- Revision:
- 0:9a0f67fe026b
- Child:
- 1:1f6d3e65d946
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/SequencerDisplay.h Fri Aug 12 20:42:30 2016 +0000
@@ -0,0 +1,56 @@
+/*
+ * SequencerDisplay.h
+ *
+ * 2016.08.13
+ *
+ */
+#ifndef _SEQUENCE_DISPLAY_H_
+#define _SEQUENCE_DISPLAY_H_
+
+#include "mbed.h"
+#include "Sequence.h"
+
+class SequencerDisplay {
+public:
+ typedef enum { stop, run } DISPLAY_MODE;
+
+ SequencerDisplay(Sequence* _sequences, int _sequenceNum) :
+ sequences(_sequences),
+ sequenceNum(_sequenceNum),
+ octave(0) {};
+
+ void update(DISPLAY_MODE mode, int step) {
+ switch (mode) {
+ case run:
+ displayWhileRun(step);
+ break;
+ case stop:
+ displayWhileStop(step);
+ break;
+ default:
+ error("SequenceDisplay::update: invalid mode");
+ };
+ };
+
+ void setOctave(int _octave) { octave = _octave; };
+ int getOctave() { return octave; };
+
+protected:
+ virtual void displayWhileRun(int step) {
+ #if (UART_TRACE)
+ printf("displayWhileRun step:%d\r\n", step);
+ #endif
+ };
+
+ virtual void displayWhileStop(int step) {
+ #if (UART_TRACE)
+ printf("displayWhileStop step:%d\r\n", step);
+ #endif
+ };
+
+ Sequence* sequences;
+ int sequenceNum;
+ int octave;
+};
+
+#endif //_SEQUENCE_DISPLAY_H_
\ No newline at end of file