Browse Source

Making rdiv1 of voltage-divider uint16

master
Torsten Stauder 4 years ago
parent
commit
08cd42de86
  1. 4
      src/settings-complete.h
  2. 2
      src/settings-custom.h
  3. 2
      src/settings-espa1s.h
  4. 4
      src/settings-lolin32.h
  5. 2
      src/settings-lolin_d32.h
  6. 8
      src/settings-lolin_d32_pro.h
  7. 2
      src/settings-lolin_d32_pro_sdmmc_pe.h
  8. 4
      src/settings-ttgo_t8.h

4
src/settings-complete.h

@ -59,7 +59,7 @@
// Control-buttons (set to 99 to DISABLE; 0->39 for GPIO; 100->115 for port-expander)
#define NEXT_BUTTON 102 // Button 0: GPIO to detect next
#define PREVIOUS_BUTTON 103 // Button 1: GPIO to detect previous (Important: as of 19.11.2020 changed from 33 to 2; make sure to change in SD-MMC-mode)
#define PREVIOUS_BUTTON 103 // Button 1: GPIO to detect previous
#define PAUSEPLAY_BUTTON 100 // Button 2: GPIO to detect pause/play
#define BUTTON_4 101 // Button 4: unnamed optional button
#define BUTTON_5 104 // Button 5: unnamed optional button
@ -102,7 +102,7 @@
// (optional) For measuring battery-voltage a voltage-divider is necessary. Their values need to be configured here.
#ifdef MEASURE_BATTERY_VOLTAGE
constexpr uint8_t rdiv1 = 100; // Rdiv1 of voltage-divider (kOhms) (measure exact value with multimeter!)
constexpr uint16_t rdiv1 = 100; // Rdiv1 of voltage-divider (kOhms) (measure exact value with multimeter!)
constexpr uint16_t rdiv2 = 33; // Rdiv2 of voltage-divider (kOhms) (measure exact value with multimeter!) => used to measure voltage via ADC!
#endif

2
src/settings-custom.h

@ -101,7 +101,7 @@
// (optional) For measuring battery-voltage a voltage-divider is necessary. Their values need to be configured here.
#ifdef MEASURE_BATTERY_VOLTAGE
constexpr uint8_t rdiv1 = 129; // Rdiv1 of voltage-divider (kOhms) (measure exact value with multimeter!)
constexpr uint16_t rdiv1 = 129; // Rdiv1 of voltage-divider (kOhms) (measure exact value with multimeter!)
constexpr uint16_t rdiv2 = 129; // Rdiv2 of voltage-divider (kOhms) (measure exact value with multimeter!) => used to measure voltage via ADC!
#endif

2
src/settings-espa1s.h

@ -102,7 +102,7 @@
// (optional) For measuring battery-voltage a voltage-divider is necessary. Their values need to be configured here.
#ifdef MEASURE_BATTERY_VOLTAGE
constexpr uint8_t rdiv1 = 129; // Rdiv1 of voltage-divider (kOhms) (measure exact value with multimeter!)
constexpr uint16_t rdiv1 = 129; // Rdiv1 of voltage-divider (kOhms) (measure exact value with multimeter!)
constexpr uint16_t rdiv2 = 389; // Rdiv2 of voltage-divider (kOhms) (measure exact value with multimeter!) => used to measure voltage via ADC!
#endif

4
src/settings-lolin32.h

@ -65,7 +65,7 @@
// Control-buttons (set to 99 to DISABLE; 0->39 for GPIO; 100->115 for port-expander)
#define NEXT_BUTTON 4 // Button 0: GPIO to detect next
#define PREVIOUS_BUTTON 2 // Button 1: GPIO to detect previous (Important: as of 19.11.2020 changed from 33 to 2; make sure to change in SD-MMC-mode)
#define PREVIOUS_BUTTON 36 // Button 1: GPIO to detect previous
#define PAUSEPLAY_BUTTON 5 // Button 2: GPIO to detect pause/play
#define BUTTON_4 99 // Button 4: unnamed optional button
#define BUTTON_5 99 // Button 5: unnamed optional button
@ -108,7 +108,7 @@
// (optional) For measuring battery-voltage a voltage-divider is necessary. Their values need to be configured here.
#ifdef MEASURE_BATTERY_VOLTAGE
constexpr uint8_t rdiv1 = 129; // Rdiv1 of voltage-divider (kOhms) (measure exact value with multimeter!)
constexpr uint16_t rdiv1 = 129; // Rdiv1 of voltage-divider (kOhms) (measure exact value with multimeter!)
constexpr uint16_t rdiv2 = 129; // Rdiv2 of voltage-divider (kOhms) (measure exact value with multimeter!) => used to measure voltage via ADC!
#endif

2
src/settings-lolin_d32.h

@ -107,7 +107,7 @@
#endif
#ifdef MEASURE_BATTERY_VOLTAGE
constexpr uint8_t rdiv1 = 100; // Cannot be changed, it's built in
constexpr uint16_t rdiv1 = 100; // Cannot be changed, it's built in
constexpr uint16_t rdiv2 = 100; // Cannot be changed, it's built in
#endif

8
src/settings-lolin_d32_pro.h

@ -59,9 +59,9 @@
//#define GPIO_HP_EN 113 // To enable amp for headphones (GPIO or port-channel)
// Control-buttons (set to 99 to DISABLE; 0->39 for GPIO; 100->115 for port-expander)
#define NEXT_BUTTON 0 // Button 0: GPIO to detect next
#define PREVIOUS_BUTTON 2 // Button 1: GPIO to detect previous (Important: as of 19.11.2020 changed from 33 to 2; make sure to change in SD-MMC-mode)
#define PAUSEPLAY_BUTTON 32 // Button 2: GPIO to detect pause/play
#define NEXT_BUTTON 33 // Button 0: GPIO to detect next
#define PREVIOUS_BUTTON 2 // Button 1: GPIO to detect previous
#define PAUSEPLAY_BUTTON 36 // Button 2: GPIO to detect pause/play
#define BUTTON_4 99 // Button 4: unnamed optional button
#define BUTTON_5 99 // Button 5: unnamed optional button
@ -103,7 +103,7 @@
// (optional) For measuring battery-voltage a voltage-divider is already onboard. Connect a LiPo and use it!
#ifdef MEASURE_BATTERY_VOLTAGE
constexpr uint8_t rdiv1 = 100; // Cannot be changed, it's built in
constexpr uint16_t rdiv1 = 100; // Cannot be changed, it's built in
constexpr uint16_t rdiv2 = 100; // Cannot be changed, it's built in
#endif

2
src/settings-lolin_d32_pro_sdmmc_pe.h

@ -99,7 +99,7 @@
// (optional) For measuring battery-voltage a voltage-divider is already onboard. Connect a LiPo and use it!
#ifdef MEASURE_BATTERY_VOLTAGE
constexpr uint8_t rdiv1 = 100; // Don't change, it's built in
constexpr uint16_t rdiv1 = 100; // Don't change, it's built in
constexpr uint16_t rdiv2 = 100; // Don't change, it's built in
#endif

4
src/settings-ttgo_t8.h

@ -60,7 +60,7 @@
// Control-buttons (set to 99 to DISABLE; 0->39 for GPIO; 100->115 for port-expander)
#define NEXT_BUTTON 0 // Button 0: GPIO to detect next
#define PREVIOUS_BUTTON 36 // Button 1: GPIO to detect previous (Important: as of 19.11.2020 changed from 33 to 2; make sure to change in SD-MMC-mode)
#define PREVIOUS_BUTTON 36 // Button 1: GPIO to detect previous
#define PAUSEPLAY_BUTTON 39 // Button 2: GPIO to detect pause/play
#define BUTTON_4 99 // Button 4: unnamed optional button
#define BUTTON_5 99 // Button 5: unnamed optional button
@ -103,7 +103,7 @@
// (optional) For measuring battery-voltage a voltage-divider is necessary. Their values need to be configured here.
#ifdef MEASURE_BATTERY_VOLTAGE
constexpr uint8_t rdiv1 = 100; // Rdiv1 of voltage-divider (kOhms) (measure exact value with multimeter!)
constexpr uint16_t rdiv1 = 100; // Rdiv1 of voltage-divider (kOhms) (measure exact value with multimeter!)
constexpr uint16_t rdiv2 = 100; // Rdiv2 of voltage-divider (kOhms) (measure exact value with multimeter!) => used to measure voltage via ADC!
#endif

Loading…
Cancel
Save