Merge branch 'master' into development

This commit is contained in:
Verkehrsrot 2020-04-12 19:39:00 +02:00 committed by GitHub
commit 9e52874d4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 3 deletions

View File

@ -14,7 +14,8 @@
#define CFG_sx1276_radio 1 #define CFG_sx1276_radio 1
#define HAS_LED (22) // Green LED on board #define HAS_LED (22) // Green LED on board
#define HAS_RGB_LED SmartLed rgb_led(LED_WS2812, 1, GPIO_NUM_2) // WS2812B RGB LED on board #define RGB_LED_COUNT 1 // we have 1 LED
#define HAS_RGB_LED SmartLed rgb_led(LED_WS2812, RGB_LED_COUNT, GPIO_NUM_2) // WS2812B RGB LED on board
#define HAS_BUTTON (0) // button "FLASH" on board #define HAS_BUTTON (0) // button "FLASH" on board
#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature #define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature

View File

@ -21,7 +21,8 @@
#define CFG_sx1276_radio 1 #define CFG_sx1276_radio 1
#define HAS_LED NOT_A_PIN // LoPy4 has no on board mono LED, we use on board RGB LED #define HAS_LED NOT_A_PIN // LoPy4 has no on board mono LED, we use on board RGB LED
#define HAS_RGB_LED SmartLed rgb_led(LED_WS2812, 1, GPIO_NUM_0) // WS2812B RGB LED on GPIO0 (P2) #define RGB_LED_COUNT 1 // we have 1 LEDs
#define HAS_RGB_LED SmartLed rgb_led(LED_WS2812, RGB_LED_COUNT, GPIO_NUM_0) // WS2812B RGB LED on GPIO0 (P2)
#define BOARD_HAS_PSRAM // use extra 4MB extern RAM #define BOARD_HAS_PSRAM // use extra 4MB extern RAM
// Note: Pins for LORA chip SPI interface come from board file pins_arduino.h // Note: Pins for LORA chip SPI interface come from board file pins_arduino.h

View File

@ -39,6 +39,7 @@
#define HAS_LED NOT_A_PIN // no on board LED (?) #define HAS_LED NOT_A_PIN // no on board LED (?)
#define RGB_LED_COUNT 10 #define RGB_LED_COUNT 10
#define HAS_RGB_LED SmartLed rgb_led(LED_SK6812, RGB_LED_COUNT, GPIO_NUM_15) // LED_SK6812 RGB LED on GPIO15 #define HAS_RGB_LED SmartLed rgb_led(LED_SK6812, RGB_LED_COUNT, GPIO_NUM_15) // LED_SK6812 RGB LED on GPIO15
#define HAS_BUTTON (39) // on board button A #define HAS_BUTTON (39) // on board button A

View File

@ -37,6 +37,6 @@
// Pins for LORA chip SPI interface come from board file, we need some // Pins for LORA chip SPI interface come from board file, we need some
// additional definitions for LMIC // additional definitions for LMIC
#define LORA_IO1 (33) #define LORA_IO1 (33)
#define LORA_IO2 LMIC_UNUSED_PIN #define LORA_IO2 (32) // ref.: https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436
#endif #endif

View File

@ -63,6 +63,7 @@ RGBColor rgb_hsl2rgb(float h, float s, float l) {
} }
void rgb_set_color(uint16_t hue) { void rgb_set_color(uint16_t hue) {
int i = RGB_LED_COUNT;
if (hue == COLOR_NONE) { if (hue == COLOR_NONE) {
// set Off // set Off
for (int i = 0; i < RGB_LED_COUNT; i++) for (int i = 0; i < RGB_LED_COUNT; i++)