Skip to content

Commit

Permalink
Use canned messages (scan and select) by default with HT-VME213 and H…
Browse files Browse the repository at this point in the history
…T-VME290
  • Loading branch information
todd-herbert committed Aug 6, 2024
1 parent 13872b1 commit b0c44cf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/mesh/NodeDB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,13 @@ void NodeDB::installDefaultModuleConfig()
moduleConfig.external_notification.output_ms = 100;
moduleConfig.external_notification.active = true;
#endif
#ifdef BUTTON_SECONDARY_CANNEDMESSAGES
// Use a board's second built-in button as input source for canned messages
moduleConfig.canned_message.enabled = true;
moduleConfig.canned_message.inputbroker_pin_press = BUTTON_PIN_SECONDARY;
strcpy(moduleConfig.canned_message.allow_input_source, "scanAndSelect");
#endif

moduleConfig.has_canned_message = true;

strncpy(moduleConfig.mqtt.address, default_mqtt_address, sizeof(moduleConfig.mqtt.address));
Expand Down
2 changes: 2 additions & 0 deletions variants/heltec_vision_master_e213/variant.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#define BUTTON_PIN 0
#define BUTTON_PIN_SECONDARY 21 // Second built-in button
#define BUTTON_SECONDARY_CANNEDMESSAGES // By default, use the secondary button as canned message input

// I2C
#define I2C_SDA SDA
Expand Down
2 changes: 2 additions & 0 deletions variants/heltec_vision_master_e290/variant.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#define BUTTON_PIN 0
#define BUTTON_PIN_SECONDARY 21 // Second built-in button
#define BUTTON_SECONDARY_CANNEDMESSAGES // By default, use the secondary button as canned message input

// I2C
#define I2C_SDA SDA
Expand Down

0 comments on commit b0c44cf

Please sign in to comment.