mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* HeltecV3 targets, now flash built-in LED on LoRa TX
This commit is contained in:
parent
37a6c230ad
commit
6fc21b815d
3 changed files with 17 additions and 2 deletions
|
|
@ -453,7 +453,7 @@ public:
|
|||
savePrefs();
|
||||
strcpy(reply, "OK");
|
||||
} else {
|
||||
sprintf(reply, "unknown config: %s", &command[4]);
|
||||
sprintf(reply, "unknown config: %s", config);
|
||||
}
|
||||
} else if (memcmp(command, "ver", 3) == 0) {
|
||||
strcpy(reply, FIRMWARE_VER_TEXT);
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ build_flags =
|
|||
-D RADIO_CLASS=CustomSX1262
|
||||
-D WRAPPER_CLASS=CustomSX1262Wrapper
|
||||
-D LORA_TX_POWER=22
|
||||
-D P_LORA_TX_LED=35
|
||||
-D SX126X_DIO2_AS_RF_SWITCH=true
|
||||
-D SX126X_DIO3_TCXO_VOLTAGE=1.8
|
||||
-D SX126X_CURRENT_LIMIT=130.0f ; for best TX power!
|
||||
|
|
@ -80,7 +81,7 @@ extends = Heltec_lora32_v3
|
|||
build_src_filter = ${Heltec_lora32_v3.build_src_filter} +<../examples/simple_room_server/main.cpp>
|
||||
build_flags =
|
||||
${Heltec_lora32_v3.build_flags}
|
||||
-D ADVERT_NAME="\"Test Room\""
|
||||
-D ADVERT_NAME="\"Heltec Room\""
|
||||
-D ADVERT_LAT=-37.0
|
||||
-D ADVERT_LON=145.0
|
||||
-D ADMIN_PASSWORD="\"password\""
|
||||
|
|
|
|||
|
|
@ -42,6 +42,11 @@ public:
|
|||
adcAttachPin(PIN_VBAT_READ);
|
||||
analogReadResolution(10);
|
||||
pinMode(PIN_ADC_CTRL, OUTPUT);
|
||||
|
||||
#ifdef P_LORA_TX_LED
|
||||
pinMode(P_LORA_TX_LED, OUTPUT);
|
||||
digitalWrite(P_LORA_TX_LED, LOW);
|
||||
#endif
|
||||
}
|
||||
|
||||
void enterDeepSleep(uint32_t secs, int pin_wake_btn = -1) {
|
||||
|
|
@ -67,6 +72,15 @@ public:
|
|||
esp_deep_sleep_start(); // CPU halts here and never returns!
|
||||
}
|
||||
|
||||
#if defined(P_LORA_TX_LED)
|
||||
void onBeforeTransmit() override {
|
||||
digitalWrite(P_LORA_TX_LED, HIGH); // turn TX LED on
|
||||
}
|
||||
void onAfterTransmit() override {
|
||||
digitalWrite(P_LORA_TX_LED, LOW); // turn TX LED off
|
||||
}
|
||||
#endif
|
||||
|
||||
uint16_t getBattMilliVolts() override {
|
||||
digitalWrite(PIN_ADC_CTRL, PIN_ADC_CTRL_ACTIVE);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue