Browse Source

Corrected spelling: changed DREHENCODER to ROTARYENCODER

master
Torsten Stauder 4 years ago
parent
commit
b12e191296
  1. 8
      src/Button.cpp
  2. 2
      src/RotaryEncoder.cpp
  3. 8
      src/settings-complete.h
  4. 8
      src/settings-custom.h
  5. 6
      src/settings-espa1s.h
  6. 8
      src/settings-lolin32.h
  7. 8
      src/settings-lolin_d32.h
  8. 8
      src/settings-lolin_d32_pro.h
  9. 8
      src/settings-ttgo_t8.h
  10. 4
      src/settings.h

8
src/Button.cpp

@ -25,9 +25,9 @@
#define EXPANDER_2_ENABLE #define EXPANDER_2_ENABLE
#endif #endif
#ifdef USEROTARY_ENABLE #ifdef USEROTARY_ENABLE
#if (DREHENCODER_BUTTON >= 0 && DREHENCODER_BUTTON <= 39)
#if (ROTARYENCODER_BUTTON >= 0 && ROTARYENCODER_BUTTON <= 39)
#define BUTTON_3_ENABLE #define BUTTON_3_ENABLE
#elif (DREHENCODER_BUTTON >= 100 && DREHENCODER_BUTTON <= 115)
#elif (ROTARYENCODER_BUTTON >= 100 && ROTARYENCODER_BUTTON <= 115)
#define EXPANDER_3_ENABLE #define EXPANDER_3_ENABLE
#endif #endif
#endif #endif
@ -103,7 +103,7 @@ void Button_Init() {
pinMode(PAUSEPLAY_BUTTON, INPUT_PULLUP); pinMode(PAUSEPLAY_BUTTON, INPUT_PULLUP);
#endif #endif
#ifdef BUTTON_3_ENABLE #ifdef BUTTON_3_ENABLE
pinMode(DREHENCODER_BUTTON, INPUT_PULLUP);
pinMode(ROTARYENCODER_BUTTON, INPUT_PULLUP);
#endif #endif
#ifdef BUTTON_4_ENABLE #ifdef BUTTON_4_ENABLE
pinMode(BUTTON_4, INPUT_PULLUP); pinMode(BUTTON_4, INPUT_PULLUP);
@ -144,7 +144,7 @@ void Button_Cyclic() {
gButtons[2].currentState = Port_Read(PAUSEPLAY_BUTTON); gButtons[2].currentState = Port_Read(PAUSEPLAY_BUTTON);
#endif #endif
#if defined(BUTTON_3_ENABLE) || defined(EXPANDER_3_ENABLE) #if defined(BUTTON_3_ENABLE) || defined(EXPANDER_3_ENABLE)
gButtons[3].currentState = Port_Read(DREHENCODER_BUTTON);
gButtons[3].currentState = Port_Read(ROTARYENCODER_BUTTON);
#endif #endif
#if defined(BUTTON_4_ENABLE) || defined(EXPANDER_4_ENABLE) #if defined(BUTTON_4_ENABLE) || defined(EXPANDER_4_ENABLE)
gButtons[4].currentState = Port_Read(BUTTON_4); gButtons[4].currentState = Port_Read(BUTTON_4);

2
src/RotaryEncoder.cpp

@ -21,7 +21,7 @@
void RotaryEncoder_Init(void) { void RotaryEncoder_Init(void) {
// Init rotary encoder // Init rotary encoder
#ifdef USEROTARY_ENABLE #ifdef USEROTARY_ENABLE
encoder.attachHalfQuad(DREHENCODER_CLK, DREHENCODER_DT);
encoder.attachHalfQuad(ROTARYENCODER_CLK, ROTARYENCODER_DT);
encoder.clearCount(); encoder.clearCount();
encoder.setCount(AudioPlayer_GetInitVolume() * 2); // Ganzes Raster ist immer +2, daher initiale Lautstärke mit 2 multiplizieren encoder.setCount(AudioPlayer_GetInitVolume() * 2); // Ganzes Raster ist immer +2, daher initiale Lautstärke mit 2 multiplizieren
#endif #endif

8
src/settings-complete.h

@ -48,9 +48,9 @@
// Rotary encoder // Rotary encoder
#ifdef USEROTARY_ENABLE #ifdef USEROTARY_ENABLE
#define DREHENCODER_CLK 35 // If you want to reverse encoder's direction, just switch GPIOs of CLK with DT (in software or hardware)
#define DREHENCODER_DT 34 // Info: Lolin D32 / Lolin D32 pro 35 are using 35 for battery-voltage-monitoring!
#define DREHENCODER_BUTTON 105 // (set to 99 to disable; 0->39 for GPIO; 100->115 for port-expander)
#define ROTARYENCODER_CLK 35 // If you want to reverse encoder's direction, just switch GPIOs of CLK with DT (in software or hardware)
#define ROTARYENCODER_DT 34 // Info: Lolin D32 / Lolin D32 pro 35 are using 35 for battery-voltage-monitoring!
#define ROTARYENCODER_BUTTON 105 // (set to 99 to disable; 0->39 for GPIO; 100->115 for port-expander)
#endif #endif
// Amp enable (optional) // Amp enable (optional)
@ -79,7 +79,7 @@
// Wake-up button => this also is the interrupt-pin if port-expander is enabled! // Wake-up button => this also is the interrupt-pin if port-expander is enabled!
// Please note: only RTC-GPIOs (0, 4, 12, 13, 14, 15, 25, 26, 27, 32, 33, 34, 35, 36, 39, 99) can be used! Set to 99 to DISABLE. // Please note: only RTC-GPIOs (0, 4, 12, 13, 14, 15, 25, 26, 27, 32, 33, 34, 35, 36, 39, 99) can be used! Set to 99 to DISABLE.
// Please note #2: this button can be used as interrupt-pin for port-expander. If so, all pins connected to port-expander can wake up ESPuino. // Please note #2: this button can be used as interrupt-pin for port-expander. If so, all pins connected to port-expander can wake up ESPuino.
#define WAKEUP_BUTTON DREHENCODER_BUTTON // Defines the button that is used to wake up ESPuino from deepsleep.
#define WAKEUP_BUTTON ROTARYENCODER_BUTTON // Defines the button that is used to wake up ESPuino from deepsleep.
// (optional) Power-control // (optional) Power-control
#define POWER 13 // GPIO used to drive transistor-circuit, that switches off peripheral devices while ESP32-deepsleep #define POWER 13 // GPIO used to drive transistor-circuit, that switches off peripheral devices while ESP32-deepsleep

8
src/settings-custom.h

@ -47,9 +47,9 @@
// Rotary encoder // Rotary encoder
#ifdef USEROTARY_ENABLE #ifdef USEROTARY_ENABLE
#define DREHENCODER_CLK 34 // If you want to reverse encoder's direction, just switch GPIOs of CLK with DT (in software or hardware)
#define DREHENCODER_DT 35 // Info: Lolin D32 / Lolin D32 pro 35 are using 35 for battery-voltage-monitoring!
#define DREHENCODER_BUTTON 32 // (set to 99 to disable; 0->39 for GPIO; 100->115 for port-expander)
#define ROTARYENCODER_CLK 34 // If you want to reverse encoder's direction, just switch GPIOs of CLK with DT (in software or hardware)
#define ROTARYENCODER_DT 35 // Info: Lolin D32 / Lolin D32 pro 35 are using 35 for battery-voltage-monitoring!
#define ROTARYENCODER_BUTTON 32 // (set to 99 to disable; 0->39 for GPIO; 100->115 for port-expander)
#endif #endif
// Amp enable (optional) // Amp enable (optional)
@ -78,7 +78,7 @@
// Wake-up button => this also is the interrupt-pin if port-expander is enabled! // Wake-up button => this also is the interrupt-pin if port-expander is enabled!
// Please note: only RTC-GPIOs (0, 4, 12, 13, 14, 15, 25, 26, 27, 32, 33, 34, 35, 36, 39, 99) can be used! Set to 99 to DISABLE. // Please note: only RTC-GPIOs (0, 4, 12, 13, 14, 15, 25, 26, 27, 32, 33, 34, 35, 36, 39, 99) can be used! Set to 99 to DISABLE.
// Please note #2: this button can be used as interrupt-pin for port-expander. If so, all pins connected to port-expander can wake up ESPuino. // Please note #2: this button can be used as interrupt-pin for port-expander. If so, all pins connected to port-expander can wake up ESPuino.
#define WAKEUP_BUTTON DREHENCODER_BUTTON // Defines the button that is used to wake up ESPuino from deepsleep.
#define WAKEUP_BUTTON ROTARYENCODER_BUTTON // Defines the button that is used to wake up ESPuino from deepsleep.
// (optional) Power-control // (optional) Power-control
#define POWER 17 // GPIO used to drive transistor-circuit, that switches off peripheral devices while ESP32-deepsleep #define POWER 17 // GPIO used to drive transistor-circuit, that switches off peripheral devices while ESP32-deepsleep

6
src/settings-espa1s.h

@ -56,9 +56,9 @@
// Rotary encoder // Rotary encoder
#ifdef USEROTARY_ENABLE #ifdef USEROTARY_ENABLE
#define DREHENCODER_CLK 5 // If you want to reverse encoder's direction, just switch GPIOs of CLK with DT (in software or hardware)
#define DREHENCODER_DT 18 // Info: Lolin D32 / Lolin D32 pro 35 are using 35 for battery-voltage-monitoring!
#define DREHENCODER_BUTTON 4 // (set to 99 to disable; 0->39 for GPIO; 100->115 for port-expander)
#define ROTARYENCODER_CLK 5 // If you want to reverse encoder's direction, just switch GPIOs of CLK with DT (in software or hardware)
#define ROTARYENCODER_DT 18 // Info: Lolin D32 / Lolin D32 pro 35 are using 35 for battery-voltage-monitoring!
#define ROTARYENCODER_BUTTON 4 // (set to 99 to disable; 0->39 for GPIO; 100->115 for port-expander)
#endif #endif
// Control-buttons (set to 99 to DISABLE; 0->39 for GPIO; 100->115 for port-expander) // Control-buttons (set to 99 to DISABLE; 0->39 for GPIO; 100->115 for port-expander)

8
src/settings-lolin32.h

@ -54,9 +54,9 @@
// Rotary encoder // Rotary encoder
#ifdef USEROTARY_ENABLE #ifdef USEROTARY_ENABLE
#define DREHENCODER_CLK 34 // If you want to reverse encoder's direction, just switch GPIOs of CLK with DT (in software or hardware)
#define DREHENCODER_DT 35 // Info: Lolin D32 / Lolin D32 pro 35 are using 35 for battery-voltage-monitoring!
#define DREHENCODER_BUTTON 32 // (set to 99 to disable; 0->39 for GPIO; 100->115 for port-expander)
#define ROTARYENCODER_CLK 34 // If you want to reverse encoder's direction, just switch GPIOs of CLK with DT (in software or hardware)
#define ROTARYENCODER_DT 35 // Info: Lolin D32 / Lolin D32 pro 35 are using 35 for battery-voltage-monitoring!
#define ROTARYENCODER_BUTTON 32 // (set to 99 to disable; 0->39 for GPIO; 100->115 for port-expander)
#endif #endif
// Amp enable (optional) // Amp enable (optional)
@ -85,7 +85,7 @@
// Wake-up button => this also is the interrupt-pin if port-expander is enabled! // Wake-up button => this also is the interrupt-pin if port-expander is enabled!
// Please note: only RTC-GPIOs (0, 4, 12, 13, 14, 15, 25, 26, 27, 32, 33, 34, 35, 36, 39, 99) can be used! Set to 99 to DISABLE. // Please note: only RTC-GPIOs (0, 4, 12, 13, 14, 15, 25, 26, 27, 32, 33, 34, 35, 36, 39, 99) can be used! Set to 99 to DISABLE.
// Please note #2: this button can be used as interrupt-pin for port-expander. If so, all pins connected to port-expander can wake up ESPuino. // Please note #2: this button can be used as interrupt-pin for port-expander. If so, all pins connected to port-expander can wake up ESPuino.
#define WAKEUP_BUTTON DREHENCODER_BUTTON // Defines the button that is used to wake up ESPuino from deepsleep.
#define WAKEUP_BUTTON ROTARYENCODER_BUTTON // Defines the button that is used to wake up ESPuino from deepsleep.
// (optional) Power-control // (optional) Power-control
#define POWER 17 // GPIO used to drive transistor-circuit, that switches off peripheral devices while ESP32-deepsleep #define POWER 17 // GPIO used to drive transistor-circuit, that switches off peripheral devices while ESP32-deepsleep

8
src/settings-lolin_d32.h

@ -54,9 +54,9 @@
// Rotary encoder // Rotary encoder
#ifdef USEROTARY_ENABLE #ifdef USEROTARY_ENABLE
#define DREHENCODER_CLK 34 // If you want to reverse encoder's direction, just switch GPIOs of CLK with DT (in software or hardware)
#define DREHENCODER_DT 33 // Info: Lolin D32 is using 35 for battery-voltage-monitoring!
#define DREHENCODER_BUTTON 32 // (set to 99 to disable; 0->39 for GPIO; 100->115 for port-expander)
#define ROTARYENCODER_CLK 34 // If you want to reverse encoder's direction, just switch GPIOs of CLK with DT (in software or hardware)
#define ROTARYENCODER_DT 33 // Info: Lolin D32 is using 35 for battery-voltage-monitoring!
#define ROTARYENCODER_BUTTON 32 // (set to 99 to disable; 0->39 for GPIO; 100->115 for port-expander)
#endif #endif
// Amp enable (optional) // Amp enable (optional)
@ -85,7 +85,7 @@
// Wake-up button => this also is the interrupt-pin if port-expander is enabled! // Wake-up button => this also is the interrupt-pin if port-expander is enabled!
// Please note: only RTC-GPIOs (0, 4, 12, 13, 14, 15, 25, 26, 27, 32, 33, 34, 35, 36, 39, 99) can be used! Set to 99 to DISABLE. // Please note: only RTC-GPIOs (0, 4, 12, 13, 14, 15, 25, 26, 27, 32, 33, 34, 35, 36, 39, 99) can be used! Set to 99 to DISABLE.
// Please note #2: this button can be used as interrupt-pin for port-expander. If so, all pins connected to port-expander can wake up ESPuino. // Please note #2: this button can be used as interrupt-pin for port-expander. If so, all pins connected to port-expander can wake up ESPuino.
#define WAKEUP_BUTTON DREHENCODER_BUTTON // Defines the button that is used to wake up ESPuino from deepsleep.
#define WAKEUP_BUTTON ROTARYENCODER_BUTTON // Defines the button that is used to wake up ESPuino from deepsleep.
// (optional) Power-control // (optional) Power-control
#define POWER 17 // GPIO used to drive transistor-circuit, that switches off peripheral devices while ESP32-deepsleep #define POWER 17 // GPIO used to drive transistor-circuit, that switches off peripheral devices while ESP32-deepsleep

8
src/settings-lolin_d32_pro.h

@ -49,9 +49,9 @@
// Rotary encoder // Rotary encoder
#ifdef USEROTARY_ENABLE #ifdef USEROTARY_ENABLE
#define DREHENCODER_CLK 34 // If you want to reverse encoder's direction, just switch GPIOs of CLK with DT (in software or hardware)
#define DREHENCODER_DT 39 // 39 = 'VN'; Info: Lolin D32 pro is using 35 for battery-voltage-monitoring!
#define DREHENCODER_BUTTON 32 // (set to 99 to disable; 0->39 for GPIO; 100->115 for port-expander)
#define ROTARYENCODER_CLK 34 // If you want to reverse encoder's direction, just switch GPIOs of CLK with DT (in software or hardware)
#define ROTARYENCODER_DT 39 // 39 = 'VN'; Info: Lolin D32 pro is using 35 for battery-voltage-monitoring!
#define ROTARYENCODER_BUTTON 32 // (set to 99 to disable; 0->39 for GPIO; 100->115 for port-expander)
#endif #endif
// Amp enable (optional) // Amp enable (optional)
@ -80,7 +80,7 @@
// Wake-up button => this also is the interrupt-pin if port-expander is enabled! // Wake-up button => this also is the interrupt-pin if port-expander is enabled!
// Please note: only RTC-GPIOs (0, 4, 12, 13, 14, 15, 25, 26, 27, 32, 33, 34, 35, 36, 39, 99) can be used! Set to 99 to DISABLE. // Please note: only RTC-GPIOs (0, 4, 12, 13, 14, 15, 25, 26, 27, 32, 33, 34, 35, 36, 39, 99) can be used! Set to 99 to DISABLE.
// Please note #2: this button can be used as interrupt-pin for port-expander. If so, all pins connected to port-expander can wake up ESPuino. // Please note #2: this button can be used as interrupt-pin for port-expander. If so, all pins connected to port-expander can wake up ESPuino.
#define WAKEUP_BUTTON DREHENCODER_BUTTON // Defines the button that is used to wake up ESPuino from deepsleep.
#define WAKEUP_BUTTON ROTARYENCODER_BUTTON // Defines the button that is used to wake up ESPuino from deepsleep.
// (optional) Power-control // (optional) Power-control
#define POWER 5 // GPIO used to drive transistor-circuit, that switches off peripheral devices while ESP32-deepsleep #define POWER 5 // GPIO used to drive transistor-circuit, that switches off peripheral devices while ESP32-deepsleep

8
src/settings-ttgo_t8.h

@ -49,9 +49,9 @@
// Rotary encoder // Rotary encoder
#ifdef USEROTARY_ENABLE #ifdef USEROTARY_ENABLE
#define DREHENCODER_CLK 34 // If you want to reverse encoder's direction, just switch GPIOs of CLK with DT (in software or hardware)
#define DREHENCODER_DT 33 // Info: Lolin D32 / Lolin D32 pro 35 are using 35 for battery-voltage-monitoring!
#define DREHENCODER_BUTTON 32 // (set to 99 to disable; 0->39 for GPIO; 100->115 for port-expander)
#define ROTARYENCODER_CLK 34 // If you want to reverse encoder's direction, just switch GPIOs of CLK with DT (in software or hardware)
#define ROTARYENCODER_DT 33 // Info: Lolin D32 / Lolin D32 pro 35 are using 35 for battery-voltage-monitoring!
#define ROTARYENCODER_BUTTON 32 // (set to 99 to disable; 0->39 for GPIO; 100->115 for port-expander)
#endif #endif
// Amp enable (optional) // Amp enable (optional)
@ -80,7 +80,7 @@
// Wake-up button => this also is the interrupt-pin if port-expander is enabled! // Wake-up button => this also is the interrupt-pin if port-expander is enabled!
// Please note: only RTC-GPIOs (0, 4, 12, 13, 14, 15, 25, 26, 27, 32, 33, 34, 35, 36, 39, 99) can be used! Set to 99 to DISABLE. // Please note: only RTC-GPIOs (0, 4, 12, 13, 14, 15, 25, 26, 27, 32, 33, 34, 35, 36, 39, 99) can be used! Set to 99 to DISABLE.
// Please note #2: this button can be used as interrupt-pin for port-expander. If so, all pins connected to port-expander can wake up ESPuino. // Please note #2: this button can be used as interrupt-pin for port-expander. If so, all pins connected to port-expander can wake up ESPuino.
#define WAKEUP_BUTTON DREHENCODER_BUTTON // Defines the button that is used to wake up ESPuino from deepsleep.
#define WAKEUP_BUTTON ROTARYENCODER_BUTTON // Defines the button that is used to wake up ESPuino from deepsleep.
// (optional) Power-control // (optional) Power-control
#define POWER 4 // GPIO used to drive transistor-circuit, that switches off peripheral devices while ESP32-deepsleep #define POWER 4 // GPIO used to drive transistor-circuit, that switches off peripheral devices while ESP32-deepsleep

4
src/settings.h

@ -79,7 +79,7 @@
0: NEXT_BUTTON 0: NEXT_BUTTON
1: PREVIOUS_BUTTON 1: PREVIOUS_BUTTON
2: PAUSEPLAY_BUTTON 2: PAUSEPLAY_BUTTON
3: DREHENCODER_BUTTON
3: ROTARYENCODER_BUTTON
4: BUTTON_4 4: BUTTON_4
5: BUTTON_5 5: BUTTON_5
@ -87,7 +87,7 @@
Single-buttons [can be long or short] (examples): Single-buttons [can be long or short] (examples):
BUTTON_0_SHORT => Button 0 (NEXT_BUTTON) pressed shortly BUTTON_0_SHORT => Button 0 (NEXT_BUTTON) pressed shortly
BUTTON_3_SHORT => Button 3 (DREHENCODER_BUTTON) pressed shortly
BUTTON_3_SHORT => Button 3 (ROTARYENCODER_BUTTON) pressed shortly
BUTTON_4_LONG => Button 4 (BUTTON_4) pressed long BUTTON_4_LONG => Button 4 (BUTTON_4) pressed long
Multi-buttons [short only] (examples): Multi-buttons [short only] (examples):

Loading…
Cancel
Save