Browse Source

* fix for RAK terminal chat

pull/4/head
Scott Powell 1 year ago
parent
commit
42af720b02
  1. 4
      platformio.ini
  2. 2
      src/helpers/BaseChatMesh.cpp
  3. 2
      src/helpers/BaseChatMesh.h

4
platformio.ini

@ -96,7 +96,7 @@ extends = Heltec_lora32_v3
build_flags =
${Heltec_lora32_v3.build_flags}
-D MAX_CONTACTS=100
-D MAX_CHANNELS=1
-D MAX_GROUP_CHANNELS=1
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
build_src_filter = ${Heltec_lora32_v3.build_src_filter} +<../examples/simple_secure_chat/main.cpp>
@ -263,7 +263,7 @@ extends = rak4631
build_flags =
${rak4631.build_flags}
-D MAX_CONTACTS=100
-D MAX_CHANNELS=1
-D MAX_GROUP_CHANNELS=1
-D MESH_PACKET_LOGGING=1
-D MESH_DEBUG=1
build_src_filter = ${rak4631.build_src_filter} +<../examples/simple_secure_chat/main.cpp>

2
src/helpers/BaseChatMesh.cpp

@ -267,7 +267,7 @@ bool BaseChatMesh::addContact(const ContactInfo& contact) {
}
mesh::GroupChannel* BaseChatMesh::addChannel(const char* psk_base64) {
if (num_channels < MAX_CHANNELS) {
if (num_channels < MAX_GROUP_CHANNELS) {
auto dest = &channels[num_channels];
memset(dest->secret, 0, sizeof(dest->secret));

2
src/helpers/BaseChatMesh.h

@ -48,7 +48,7 @@ class BaseChatMesh : public mesh::Mesh {
int sort_array[MAX_CONTACTS];
int matching_peer_indexes[MAX_SEARCH_RESULTS];
unsigned long txt_send_timeout;
mesh::GroupChannel channels[MAX_CHANNELS];
mesh::GroupChannel channels[MAX_GROUP_CHANNELS];
int num_channels;
mesh::Packet* composeMsgPacket(const ContactInfo& recipient, uint8_t attempt, const char *text, uint32_t& expected_ack);

Loading…
Cancel
Save