From 768356afce8206d37fd6d9b213739d20f139b171 Mon Sep 17 00:00:00 2001 From: mxmxmx Date: Mon, 4 Feb 2019 13:32:12 +0100 Subject: [PATCH 1/2] [ASR] bytebeat CV fix --- software/o_c_REV/APP_ASR.ino | 2 +- software/o_c_REV/OC_options.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/software/o_c_REV/APP_ASR.ino b/software/o_c_REV/APP_ASR.ino index 656a6710..ab8b067f 100644 --- a/software/o_c_REV/APP_ASR.ino +++ b/software/o_c_REV/APP_ASR.ino @@ -565,7 +565,7 @@ public: _bytebeat_p1 += (_pitch << 4); _bytebeat_p1 = USAT16(_bytebeat_p1); break; - case 5: // P4 + case 4: // P4 _bytebeat_p2 += (_pitch << 4); _bytebeat_p2 = USAT16(_bytebeat_p2); break; diff --git a/software/o_c_REV/OC_options.h b/software/o_c_REV/OC_options.h index 0775f640..10fc13d6 100644 --- a/software/o_c_REV/OC_options.h +++ b/software/o_c_REV/OC_options.h @@ -31,4 +31,3 @@ #endif #endif - From 55125b49092f2149f3dcd932cd31cf8d15873285 Mon Sep 17 00:00:00 2001 From: mxmxmx Date: Mon, 25 Feb 2019 13:22:54 +0100 Subject: [PATCH 2/2] [ADC] FLIP_180 --- software/o_c_REV/OC_ADC.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/software/o_c_REV/OC_ADC.h b/software/o_c_REV/OC_ADC.h index 3529bc05..4bf443d6 100644 --- a/software/o_c_REV/OC_ADC.h +++ b/software/o_c_REV/OC_ADC.h @@ -3,6 +3,7 @@ #include "src/drivers/ADC/OC_util_ADC.h" #include "OC_config.h" +#include "OC_options.h" #include #include @@ -100,10 +101,13 @@ class ADC { /* * below: channel ids for the ADCx_SCA register: we have 4 inputs * CV1 (19) = A5 = 0x4C; CV2 (18) = A4 = 0x4D; CV3 (20) = A6 = 0x46; CV4 (17) = A3 = 0x49 - * for some reason the IDs must be in order: CV2, CV3, CV4, CV1 (as is, this will break the FLIP_180 option) + * for some reason the IDs must be in order: CV2, CV3, CV4, CV1 resp. (when flipped) CV3, CV2, CV1, CV4 */ - - static constexpr uint16_t SCA_CHANNEL_ID[DMA_NUM_CH] = { 0x4D, 0x46, 0x49, 0x4C }; + #ifdef FLIP_180 + static constexpr uint16_t SCA_CHANNEL_ID[DMA_NUM_CH] = { 0x46, 0x4D, 0x4C, 0x49 }; + #else + static constexpr uint16_t SCA_CHANNEL_ID[DMA_NUM_CH] = { 0x4D, 0x46, 0x49, 0x4C }; + #endif }; };