Skip to content

Commit

Permalink
Merge pull request #82 from mxmxmx/dev136
Browse files Browse the repository at this point in the history
[fix] FLIP_180
  • Loading branch information
mxmxmx authored Feb 28, 2019
2 parents c2f38e5 + 55125b4 commit c01588d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion software/o_c_REV/APP_ASR.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 7 additions & 3 deletions software/o_c_REV/OC_ADC.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include "src/drivers/ADC/OC_util_ADC.h"
#include "OC_config.h"
#include "OC_options.h"

#include <stdint.h>
#include <string.h>
Expand Down Expand Up @@ -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
};

};
Expand Down
1 change: 0 additions & 1 deletion software/o_c_REV/OC_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@
#endif

#endif

0 comments on commit c01588d

Please sign in to comment.