tidied up, prob broke everything

pull/3647/head
Gareth Coleman 2024-04-22 16:37:05 +01:00
rodzic ec2b854ea2
commit 6669b22db3
17 zmienionych plików z 67 dodań i 43 usunięć

Wyświetl plik

@ -29,10 +29,7 @@ const uint32_t g_ADigitalPinMap[] = {
void initVariant()
{
// LED1 & LED2
// LED1
pinMode(PIN_LED1, OUTPUT);
ledOff(PIN_LED1);
pinMode(PIN_LED2, OUTPUT);
ledOff(PIN_LED2);
}
}

Wyświetl plik

@ -43,24 +43,13 @@ extern "C" {
#define NUM_ANALOG_OUTPUTS (0)
// LEDs
#define PIN_LED1 (0 + 12) // Blue LED P1.12
#define PIN_LED2 (0 + 6) // Built in Green P0.06
// Green Built in LED1
// #define PIN_LED1 (0 + 6) // LED1 P1.15
// RGB NeoPixel LED2
// #define PIN_LED1 (0 + 8) Red
// #define PIN_LED1 (32 + 9) Green
// #define PIN_LED1 (0 + 12) Blue
#define PIN_LED1 (0 + 6) // Built in Green P0.06
#define RGBLED_RED (0 + 8) // Red of RGB P0.08
#define RGBLED_GREEN (32 + 9) // Green of RGB P1.09
#define RGBLED_BLUE (0 + 12) // Blue of RGB P0.12
#define RGBLED_CA // comment out this line if you have a common cathode type, as defined use common anode logic
#define LED_BUILTIN PIN_LED1
#define LED_CONN PIN_LED2
#define LED_GREEN PIN_LED1
#define LED_BLUE PIN_LED2
#define LED_STATE_ON 0 // State when LED is litted
/*
* Buttons

Wyświetl plik

@ -15,4 +15,4 @@ upload_protocol = esptool
upload_speed = 460800
lib_deps =
${esp32_base.lib_deps}
makuna/NeoPixelBus@^2.7.1
adafruit/Adafruit NeoPixel @ ^1.12.0

Wyświetl plik

@ -1,5 +1,4 @@
// https://betafpv.com/products/elrs-micro-tx-module
#include <NeoPixelBus.h>
// 0.96" OLED
#define I2C_SDA 22
@ -15,7 +14,11 @@
#define LORA_CS 5
#define RF95_FAN_EN 17
#define LED_PIN 16 // This is a LED_WS2812 not a standard LED
// #define LED_PIN 16 // This is a LED_WS2812 not a standard LED
#define HAS_NEOPIXEL // Enable the use of neopixels
#define NEOPIXEL_COUNT 1 // How many neopixels are connected
#define NEOPIXEL_DATA 16 // gpio pin used to send data to the neopixels
#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use
#define BUTTON_PIN 25
#define BUTTON_NEED_PULLUP
@ -31,4 +34,4 @@
#define SX128X_TXEN 26
#define SX128X_RXEN 27
#define SX128X_RESET LORA_RESET
#define SX128X_MAX_POWER 13
#define SX128X_MAX_POWER 13

Wyświetl plik

@ -22,4 +22,4 @@ build_flags = ${esp32_base.build_flags}
lib_deps = ${esp32s3_base.lib_deps}
zinggjm/GxEPD2@^1.5.3
;adafruit/Adafruit NeoPixel@^1.10.7
adafruit/Adafruit NeoPixel @ ^1.12.0

Wyświetl plik

@ -10,6 +10,10 @@
// #define LED_PIN PIN_LED
// Board has RGB LED 21
#define HAS_NEOPIXEL // Enable the use of neopixels
#define NEOPIXEL_COUNT 1 // How many neopixels are connected
#define NEOPIXEL_DATA 21 // gpio pin used to send data to the neopixels
#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use
// The usbPower state is revered ?
// DEBUG | ??:??:?? 365 [Power] Battery: usbPower=0, isCharging=0, batMv=4116, batPct=90

Wyświetl plik

@ -20,4 +20,5 @@ build_src_filter = ${nrf52_base.build_src_filter} +<../variants/lora_relay_v1>
lib_deps =
${nrf52840_base.lib_deps}
sparkfun/SparkFun BQ27441 LiPo Fuel Gauge Arduino Library@^1.1.0
bodmer/TFT_eSPI@^2.4.76
bodmer/TFT_eSPI@^2.4.76
adafruit/Adafruit NeoPixel @ ^1.12.0

Wyświetl plik

@ -44,15 +44,19 @@ extern "C" {
// LEDs
#define PIN_LED1 (3)
#define PIN_LED2 (4)
#define PIN_NEOPIXEL (8)
// #define PIN_NEOPIXEL (8)
#define HAS_NEOPIXEL // Enable the use of neopixels
#define NEOPIXEL_COUNT 1 // How many neopixels are connected
#define NEOPIXEL_DATA 8 // gpio pin used to send data to the neopixels
#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use
#define LED_BUILTIN PIN_LED1
#define LED_CONN PIN_LED2
#define PIN_LED2
#define LED_RED PIN_LED1
#define LED_BLUE PIN_LED2
#define LED_STATE_ON 1 // State when LED is litted
#define 1 // State when LED is litted
/*
* Buttons
@ -154,4 +158,4 @@ static const uint8_t SCK = PIN_SPI_SCK;
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
#endif
#endif

Wyświetl plik

@ -23,3 +23,4 @@ lib_deps =
${nrf52840_base.lib_deps}
sparkfun/SparkFun BQ27441 LiPo Fuel Gauge Arduino Library@^1.1.0
bodmer/TFT_eSPI@^2.4.76
adafruit/Adafruit NeoPixel @ ^1.12.0

Wyświetl plik

@ -61,16 +61,21 @@ extern "C" {
// LEDs
#define PIN_LED1 (3)
#define PIN_LED2 (4)
#define PIN_NEOPIXEL (8)
// #define PIN_NEOPIXEL (8)
#define HAS_NEOPIXEL // Enable the use of neopixels
#define NEOPIXEL_COUNT 1 // How many neopixels are connected
#define NEOPIXEL_DATA 8 // gpio pin used to send data to the neopixels
#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use
#define PIN_BUZZER (40)
#define LED_BUILTIN PIN_LED1
#define LED_CONN PIN_LED2
#define PIN_LED2
#define LED_RED PIN_LED1
#define LED_BLUE PIN_LED2
#define LED_STATE_ON 1 // State when LED is litted
#define 1 // State when LED is litted
/*
* Buttons
@ -180,4 +185,4 @@ static const uint8_t SCK = PIN_SPI_SCK;
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
#endif
#endif

Wyświetl plik

@ -13,7 +13,7 @@ platform_packages =
lib_deps =
${esp32_base.lib_deps}
zinggjm/GxEPD2@^1.5.1
adafruit/Adafruit NeoPixel@^1.10.7
adafruit/Adafruit NeoPixel @ ^1.12.0
build_unflags = -DARDUINO_USB_MODE=1
build_flags =
;${esp32_base.build_flags} -D MY_ESP32S3_DIY -I variants/my_esp32s3_diy_eink
@ -24,4 +24,4 @@ build_flags =
-DEINK_HEIGHT=128
-DBOARD_HAS_PSRAM
-mfix-esp32-psram-cache-issue
-DARDUINO_USB_MODE=0
-DARDUINO_USB_MODE=0

Wyświetl plik

@ -12,6 +12,10 @@
#define I2C_SCL 17 // 2
// #define LED_PIN 38 // This is a RGB LED not a standard LED
#define HAS_NEOPIXEL // Enable the use of neopixels
#define NEOPIXEL_COUNT 1 // How many neopixels are connected
#define NEOPIXEL_DATA 38 // gpio pin used to send data to the neopixels
#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use
#define BUTTON_PIN 0 // This is the BOOT button
#define BUTTON_NEED_PULLUP

Wyświetl plik

@ -12,11 +12,11 @@ platform_packages =
tool-esptoolpy@^1.40500.0
lib_deps =
${esp32_base.lib_deps}
adafruit/Adafruit NeoPixel@^1.10.7
adafruit/Adafruit NeoPixel @ ^1.12.0
build_unflags = -DARDUINO_USB_MODE=1
build_flags =
;${esp32_base.build_flags} -D MY_ESP32S3_DIY -I variants/my_esp32s3_diy_oled
${esp32_base.build_flags} -D PRIVATE_HW -I variants/my_esp32s3_diy_oled
-DBOARD_HAS_PSRAM
-mfix-esp32-psram-cache-issue
-DARDUINO_USB_MODE=0
-DARDUINO_USB_MODE=0

Wyświetl plik

@ -12,6 +12,10 @@
#define I2C_SCL 17 // 2
// #define LED_PIN 38 // This is a RGB LED not a standard LED
#define HAS_NEOPIXEL // Enable the use of neopixels
#define NEOPIXEL_COUNT 1 // How many neopixels are connected
#define NEOPIXEL_DATA 38 // gpio pin used to send data to the neopixels
#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use
#define BUTTON_PIN 0 // This is the BOOT button
#define BUTTON_NEED_PULLUP
@ -53,4 +57,4 @@
// #define PIN_EINK_DC 1
// #define PIN_EINK_RES (-1)
// #define PIN_EINK_SCLK 5
// #define PIN_EINK_MOSI 6
// #define PIN_EINK_MOSI 6

Wyświetl plik

@ -13,6 +13,7 @@ build_unflags =
-D ARDUINO_USB_MODE
build_flags = ${esp32_base.build_flags}
-D BOARD_HAS_PSRAM
-D UNPHONE
-I variants/unphone
-D ARDUINO_USB_MODE=0
@ -27,4 +28,5 @@ build_src_filter = ${esp32_base.build_src_filter} +<../variants/unphone>
lib_deps = ${esp32s3_base.lib_deps}
lovyan03/LovyanGFX @ ^1.1.8
https://gitlab.com/hamishcunningham/unphonelibrary#meshtastic @ ^9.0.0
https://gitlab.com/hamishcunningham/unphonelibrary#meshtastic @ ^9.0.0
adafruit/Adafruit NeoPixel @ ^1.12.0

Wyświetl plik

@ -10,6 +10,7 @@ void initVariant()
unphone.printWakeupReason(); // what woke us up? (stored, not printed :|)
unphone.checkPowerSwitch(); // if power switch is off, shutdown
unphone.backlight(false); // setup backlight and make sure its off
unphone.expanderPower(true); // enable power to expander / hat / sheild
for (int i = 0; i < 3; i++) { // buzz a bit
unphone.vibe(true);

Wyświetl plik

@ -1,7 +1,16 @@
// meshtastic/firmware/variants/unphone/variant.h
#pragma once
// RGB LED configuration
#define HAS_NEOPIXEL // Enable the use of neopixels
#define NEOPIXEL_COUNT 1 // How many neopixels are connected
#define NEOPIXEL_DATA A0 // gpio pin used to send data to the neopixels
#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
// NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products)
// NEO_RGB Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
// NEO_RGBW Pixels are wired for RGBW bitstream (NeoPixel RGBW products)
#define SPI_SCK 39
#define SPI_MOSI 40
#define SPI_MISO 41
@ -38,7 +47,7 @@
#define SCREEN_TRANSITION_FRAMERATE 5
#define HAS_TOUCHSCREEN 1
#define USE_XPT2046 1
#define USE_XPT2046
#define TOUCH_CS 38
#define HAS_GPS \