Compare commits

...

1 Commits

Author SHA1 Message Date
Matthias Wientapper
46a44d10e7 Heltec v4: Add cli command to toggle gpio48 2026-01-13 21:55:39 +01:00
3 changed files with 14 additions and 0 deletions

View File

@@ -264,6 +264,15 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch
} else if (memcmp(command, "clear stats", 11) == 0) { } else if (memcmp(command, "clear stats", 11) == 0) {
_callbacks->clearStats(); _callbacks->clearStats();
strcpy(reply, "(OK - stats reset)"); strcpy(reply, "(OK - stats reset)");
#ifdef PIN_GPIO
} else if (memcmp(command, "gpio 1", 6) == 0) {
digitalWrite(PIN_GPIO, HIGH);
strcpy(reply, "(OK - gpio HIGH)");
} else if (memcmp(command, "gpio 0", 6) == 0) {
digitalWrite(PIN_GPIO, LOW);
strcpy(reply, "(OK - gpio LOW)");
#endif
/* /*
* GET commands * GET commands
*/ */

View File

@@ -16,6 +16,10 @@ void HeltecV4Board::begin() {
pinMode(P_LORA_PA_TX_EN, OUTPUT); pinMode(P_LORA_PA_TX_EN, OUTPUT);
digitalWrite(P_LORA_PA_TX_EN,LOW); digitalWrite(P_LORA_PA_TX_EN,LOW);
#ifdef PIN_GPIO
pinMode(PIN_GPIO, OUTPUT);
digitalWrite(PIN_GPIO, LOW);
#endif
periph_power.begin(); periph_power.begin();

View File

@@ -40,6 +40,7 @@ build_flags =
-D ENV_INCLUDE_GPS=1 -D ENV_INCLUDE_GPS=1
-D PIN_ADC_CTRL=37 -D PIN_ADC_CTRL=37
-D PIN_VBAT_READ=1 -D PIN_VBAT_READ=1
-D PIN_GPIO=48
build_src_filter = ${esp32_base.build_src_filter} build_src_filter = ${esp32_base.build_src_filter}
+<../variants/heltec_v4> +<../variants/heltec_v4>
+<helpers/sensors> +<helpers/sensors>