Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/helpers/CommonCLI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,15 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch
} else if (memcmp(command, "clear stats", 11) == 0) {
_callbacks->clearStats();
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
*/
Expand Down
4 changes: 4 additions & 0 deletions variants/heltec_v4/HeltecV4Board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ void HeltecV4Board::begin() {
pinMode(P_LORA_PA_TX_EN, OUTPUT);
digitalWrite(P_LORA_PA_TX_EN,LOW);

#ifdef PIN_GPIO
pinMode(PIN_GPIO, OUTPUT);
digitalWrite(PIN_GPIO, LOW);
#endif

periph_power.begin();

Expand Down
1 change: 1 addition & 0 deletions variants/heltec_v4/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ build_flags =
-D ENV_INCLUDE_GPS=1
-D PIN_ADC_CTRL=37
-D PIN_VBAT_READ=1
-D PIN_GPIO=48
build_src_filter = ${esp32_base.build_src_filter}
+<../variants/heltec_v4>
+<helpers/sensors>
Expand Down