Ryo Od / Mbed 2 deprecated BaseMachine_UI_Controller

Dependencies:   AverageAnalogIn PinDetect RotaryEncoder Sequence SequencerDisplay mbed-rtos mbed st7567LCD BaseMachineComon

Fork of BaseMachine_Sequencer by Ryo Od

Revision:
46:0fb579ecdd77
Parent:
45:3c7143da38d1
Child:
47:f4c16d1e4207
--- a/main.cpp	Fri Oct 07 09:56:34 2016 +0000
+++ b/main.cpp	Fri Oct 07 10:41:48 2016 +0000
@@ -279,6 +279,7 @@
     if (_bpm != bpm) {
         bpm = _bpm;
         sequencerDisplay.setBpm(_bpm);
+        SpiSendParams(CMD_BPM, _bpm);
         isDirty = true;
     }
     
@@ -287,12 +288,16 @@
         currentStep = _step;
         // syncronize sequence value & Rotary Encoder's value
         RotEncPitch.setVal(sequences[currentStep].getPitch());
+        SpiSendParams(CMD_NOTE, getNoteData(_step));
+        SpiSendParams(CMD_PITCH, sequences[_step].getPitch());
         isDirty = true;
     }
     
     int _pitch = RotEncPitch.getVal();
     if (_pitch != sequences[currentStep].getPitch()) {
         sequences[currentStep].setPitch(_pitch);
+        SpiSendParams(CMD_NOTE, getNoteData(currentStep));
+        SpiSendParams(CMD_PITCH, _pitch);
         isDirty = true;
     }
 }