File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ void loop() {
4848 delay (1000 );
4949 }
5050 else {
51- // Read the turntable, basic (-30-29. Clockwise = positive, faster = larger)
51+ // Read the turntable, basic (-30-29. Clockwise = positive, faster = larger). ~900 ticks per revolution.
5252 int turntable = dj.turntable ();
5353
5454 Serial.print (" The turntable is " );
@@ -108,19 +108,19 @@ void loop() {
108108 Serial.print (" The effect dial is at " );
109109 Serial.println (fx);
110110
111- // Read the crossfade slider (-8-7, negative to the left )
111+ // Read the crossfade slider (0-15, left to right )
112112 int cross = dj.crossfadeSlider ();
113113
114114 Serial.print (" The crossfade slider is " );
115115
116- if (cross <= - 2 ) {
116+ if (cross <= 6 ) {
117117 Serial.println (" left" );
118118 }
119- else if (cross >= 1 ) {
119+ else if (cross >= 9 ) {
120120 Serial.println (" right" );
121121 }
122122 else {
123- Serial.println (" center " );
123+ Serial.println (" centered " );
124124 }
125125
126126 // Read the joystick axis (0-63 XY)
Original file line number Diff line number Diff line change @@ -69,8 +69,8 @@ uint8_t DJTurntableController_Shared::effectDial() const {
6969 return getControlData (Maps::EffectDial);
7070}
7171
72- int8_t DJTurntableController_Shared::crossfadeSlider () const {
73- return getControlData (Maps::CrossfadeSlider) - 8 ; // Shifted to signed int
72+ uint8_t DJTurntableController_Shared::crossfadeSlider () const {
73+ return getControlData (Maps::CrossfadeSlider);
7474}
7575
7676boolean DJTurntableController_Shared::buttonEuphoria () const {
@@ -154,7 +154,7 @@ void DJTurntableController_Shared::printDebug(Print& output) {
154154 char euphoriaPrint = buttonEuphoria () ? ' E' : fillCharacter;
155155
156156 sprintf (buffer,
157- " Joy:(%2u, %2u) | %c | %c%c | FX: %2u | Fade: %2d " ,
157+ " Joy:(%2u, %2u) | %c | %c%c | FX: %2u | Fade: %2u " ,
158158 joyX (), joyY (),
159159 euphoriaPrint,
160160 minusPrint, plusPrint,
Original file line number Diff line number Diff line change @@ -68,14 +68,14 @@ namespace NintendoExtensionCtrl {
6868 Both,
6969 };
7070
71- int8_t turntable () const ; // 6 bits, -30-29. Clockwise = positive, faster = larger.
71+ int8_t turntable () const ; // 6 bits, -30-29. Clockwise = positive, faster = larger. ~900 ticks per revolution.
7272
7373 boolean buttonGreen () const ;
7474 boolean buttonRed () const ;
7575 boolean buttonBlue () const ;
7676
7777 uint8_t effectDial () const ; // 5 bits, 0-31. One rotation per rollover.
78- int8_t crossfadeSlider () const ; // 4 bits, -8-7. Negative to the left .
78+ uint8_t crossfadeSlider () const ; // 4 bits, 0-15. Left to right .
7979
8080 boolean buttonEuphoria () const ;
8181
You can’t perform that action at this time.
0 commit comments