Compare commits
1 Commits
v1.14.1-ev
...
cli_gpio
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
46a44d10e7 |
@@ -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
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user