Skip to content

Commit 3e7459a

Browse files
authored
Merge pull request #719 from recrof/vision_master_refactor
renamend and refactored vision master, added usb roles
2 parents 6334971 + ddc900c commit 3e7459a

21 files changed

+143
-102
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.

variants/heltec_vision_master_e213/HeltecE213Board.cpp renamed to variants/heltec_e213/HeltecE213Board.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void HeltecE213Board::begin() {
2323
void HeltecE213Board::enterDeepSleep(uint32_t secs, int pin_wake_btn) {
2424
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON);
2525

26-
// Make sure the DIO1 and NSS GPIOs are hold on required levels during deep sleep
26+
// Make sure the DIO1 and NSS GPIOs are hold on required levels during deep sleep
2727
rtc_gpio_set_direction((gpio_num_t)P_LORA_DIO_1, RTC_GPIO_MODE_INPUT_ONLY);
2828
rtc_gpio_pulldown_en((gpio_num_t)P_LORA_DIO_1);
2929

@@ -44,8 +44,7 @@ void HeltecE213Board::begin() {
4444
}
4545

4646
void HeltecE213Board::powerOff() {
47-
// TODO: re-enable this when there is a definite wake-up source pin:
48-
// enterDeepSleep(0);
47+
enterDeepSleep(0);
4948
}
5049

5150
uint16_t HeltecE213Board::getBattMilliVolts() {
@@ -66,4 +65,3 @@ void HeltecE213Board::begin() {
6665
const char* HeltecE213Board::getManufacturerName() const {
6766
return "Heltec E213";
6867
}
69-

variants/heltec_vision_master_e213/HeltecE213Board.h renamed to variants/heltec_e213/HeltecE213Board.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,6 @@
55
#include <helpers/ESP32Board.h>
66
#include <driver/rtc_io.h>
77

8-
// LoRa radio module pins for heltec_vision_master_e213
9-
#define P_LORA_DIO_1 14
10-
#define P_LORA_NSS 8
11-
#define P_LORA_RESET 12
12-
#define P_LORA_BUSY 13
13-
#define P_LORA_SCLK 9
14-
#define P_LORA_MISO 11
15-
#define P_LORA_MOSI 10
16-
178
class HeltecE213Board : public ESP32Board {
189

1910
public:
@@ -26,5 +17,4 @@ class HeltecE213Board : public ESP32Board {
2617
void powerOff() override;
2718
uint16_t getBattMilliVolts() override;
2819
const char* getManufacturerName() const override ;
29-
3020
};
Lines changed: 47 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
1-
[Heltec_Vision_Master_E213_base]
1+
[Heltec_E213_base]
22
extends = esp32_base
3-
board = heltec_vision_master_e213
3+
board = heltec_e213
44
build_flags =
55
${esp32_base.build_flags}
6-
-I variants/heltec_vision_master_e213
7-
-D HELTEC_VISION_MASTER_E213
6+
-I variants/heltec_e213
7+
-D Vision_Master_E213
8+
-D ARDUINO_USB_CDC_ON_BOOT=1
89
-D RADIO_CLASS=CustomSX1262
910
-D WRAPPER_CLASS=CustomSX1262Wrapper
10-
-D LORA_TX_POWER=22
11+
-D P_LORA_DIO_1=14
12+
-D P_LORA_NSS=8
13+
-D P_LORA_RESET=12
14+
-D P_LORA_BUSY=13
15+
-D P_LORA_SCLK=9
16+
-D P_LORA_MISO=11
17+
-D P_LORA_MOSI=10
1118
-D P_LORA_TX_LED=45
19+
-D LORA_TX_POWER=22
1220
-D PIN_USER_BTN=0
1321
-D PIN_VEXT_EN=18
1422
-D PIN_VEXT_EN_ACTIVE=HIGH
@@ -26,61 +34,78 @@ build_flags =
2634
-D DISP_RST=3
2735
-D DISP_SCLK=4
2836
-D DISP_MOSI=6
29-
-D Vision_Master_E213
3037
build_src_filter = ${esp32_base.build_src_filter}
31-
+<../variants/heltec_vision_master_e213>
38+
+<../variants/heltec_e213>
3239
lib_deps =
3340
${esp32_base.lib_deps}
3441
https://github.com/Quency-D/heltec-eink-modules/archive/563dd41fd850a1bc3039b8723da4f3a20fe1c800.zip
3542

36-
[env:Heltec_Vision_Master_E213_radio_ble]
37-
extends = Heltec_Vision_Master_E213_base
43+
[env:Heltec_E213_companion_radio_ble]
44+
extends = Heltec_E213_base
3845
build_flags =
39-
${Heltec_Vision_Master_E213_base.build_flags}
46+
${Heltec_E213_base.build_flags}
4047
-I examples/companion_radio/ui-new
4148
-D MAX_CONTACTS=300
4249
-D MAX_GROUP_CHANNELS=8
4350
-D DISPLAY_CLASS=E213Display
4451
-D BLE_PIN_CODE=123456 ; dynamic, random PIN
4552
-D BLE_DEBUG_LOGGING=1
4653
-D OFFLINE_QUEUE_SIZE=256
47-
build_src_filter = ${Heltec_Vision_Master_E213_base.build_src_filter}
54+
build_src_filter = ${Heltec_E213_base.build_src_filter}
55+
+<helpers/ui/E213Display.cpp>
56+
+<helpers/esp32/*.cpp>
57+
+<../examples/companion_radio/*.cpp>
58+
+<../examples/companion_radio/ui-new/*.cpp>
59+
lib_deps =
60+
${Heltec_E213_base.lib_deps}
61+
densaugeo/base64 @ ~1.4.0
62+
63+
[env:Heltec_E213_companion_radio_usb]
64+
extends = Heltec_E213_base
65+
build_flags =
66+
${Heltec_E213_base.build_flags}
67+
-I examples/companion_radio/ui-new
68+
-D MAX_CONTACTS=300
69+
-D MAX_GROUP_CHANNELS=8
70+
-D DISPLAY_CLASS=E213Display
71+
-D OFFLINE_QUEUE_SIZE=256
72+
build_src_filter = ${Heltec_E213_base.build_src_filter}
4873
+<helpers/ui/E213Display.cpp>
4974
+<helpers/esp32/*.cpp>
5075
+<../examples/companion_radio/*.cpp>
5176
+<../examples/companion_radio/ui-new/*.cpp>
5277
lib_deps =
53-
${Heltec_Vision_Master_E213_base.lib_deps}
78+
${Heltec_E213_base.lib_deps}
5479
densaugeo/base64 @ ~1.4.0
5580

56-
[env:Heltec_Vision_Master_E213_repeater]
57-
extends = Heltec_Vision_Master_E213_base
81+
[env:Heltec_E213_repeater]
82+
extends = Heltec_E213_base
5883
build_flags =
59-
${Heltec_Vision_Master_E213_base.build_flags}
84+
${Heltec_E213_base.build_flags}
6085
-D DISPLAY_CLASS=E213Display
6186
-D ADVERT_NAME='"Heltec E213 Repeater"'
6287
-D ADVERT_LAT=0.0
6388
-D ADVERT_LON=0.0
64-
build_src_filter = ${Heltec_Vision_Master_E213_base.build_src_filter}
89+
build_src_filter = ${Heltec_E213_base.build_src_filter}
6590
+<helpers/ui/E213Display.cpp>
6691
+<../examples/simple_repeater>
6792
lib_deps =
68-
${Heltec_Vision_Master_E213_base.lib_deps}
93+
${Heltec_E213_base.lib_deps}
6994
${esp32_ota.lib_deps}
7095

71-
[env:Heltec_Vision_Master_E213_room_server]
72-
extends = Heltec_Vision_Master_E213_base
96+
[env:Heltec_E213_room_server]
97+
extends = Heltec_E213_base
7398
build_flags =
74-
${Heltec_Vision_Master_E213_base.build_flags}
99+
${Heltec_E213_base.build_flags}
75100
-D DISPLAY_CLASS=E213Display
76101
-D ADVERT_NAME='"Heltec E213 Room"'
77102
-D ADVERT_LAT=0.0
78103
-D ADVERT_LON=0.0
79104
-D ADMIN_PASSWORD='"password"'
80105
-D ROOM_PASSWORD='"hello"'
81-
build_src_filter = ${Heltec_Vision_Master_E213_base.build_src_filter}
106+
build_src_filter = ${Heltec_E213_base.build_src_filter}
82107
+<helpers/ui/E213Display.cpp>
83108
+<../examples/simple_room_server>
84109
lib_deps =
85-
${Heltec_Vision_Master_E213_base.lib_deps}
110+
${Heltec_E213_base.lib_deps}
86111
${esp32_ota.lib_deps}
File renamed without changes.
File renamed without changes.

variants/heltec_vision_master_e290/HeltecE290Board.cpp renamed to variants/heltec_e290/HeltecE290Board.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void HeltecE290Board::begin() {
2323
void HeltecE290Board::enterDeepSleep(uint32_t secs, int pin_wake_btn) {
2424
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON);
2525

26-
// Make sure the DIO1 and NSS GPIOs are hold on required levels during deep sleep
26+
// Make sure the DIO1 and NSS GPIOs are hold on required levels during deep sleep
2727
rtc_gpio_set_direction((gpio_num_t)P_LORA_DIO_1, RTC_GPIO_MODE_INPUT_ONLY);
2828
rtc_gpio_pulldown_en((gpio_num_t)P_LORA_DIO_1);
2929

@@ -44,8 +44,7 @@ void HeltecE290Board::begin() {
4444
}
4545

4646
void HeltecE290Board::powerOff() {
47-
// TODO: re-enable this when there is a definite wake-up source pin:
48-
// enterDeepSleep(0);
47+
enterDeepSleep(0);
4948
}
5049

5150
uint16_t HeltecE290Board::getBattMilliVolts() {
@@ -66,4 +65,3 @@ void HeltecE290Board::begin() {
6665
const char* HeltecE290Board::getManufacturerName() const {
6766
return "Heltec E290";
6867
}
69-

0 commit comments

Comments
 (0)