File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ I [EspNowService] ESP-NOW version: 2.0
4343
4444### Larger Messages
4545
46- - Message size increased from ** 127 to 1417 characters**
46+ - Message size increased from ** 127 to 1416 characters**
4747- Variable-length packet transmission (only sends actual message length)
4848- Backwards compatible: messages < 197 chars still work with v1.0 devices
4949
@@ -69,7 +69,7 @@ Offset Size Field
6969| ` Tactility/Private/Tactility/app/chat/ChatProtocol.h ` | ` MESSAGE_SIZE ` = 1417, added header constants |
7070| ` Tactility/Source/app/chat/ChatProtocol.cpp ` | Variable-length serialize/deserialize |
7171| ` Tactility/Source/app/chat/ChatApp.cpp ` | Send actual packet size |
72- | ` Tactility/Source/app/chat/ChatView.cpp ` | Input field max length = 1417 |
72+ | ` Tactility/Source/app/chat/ChatView.cpp ` | Input field max length = 1416 |
7373| ` Documentation/chat.md ` | Updated protocol documentation |
7474
7575## Compatibility
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ void ChatApp::enableEspNow() {
2828 service::espnow::Mode::Station,
2929 1 , // Channel 1 default; actual channel determined by WiFi if connected
3030 false ,
31- false
31+ settings. hasEncryptionKey
3232 );
3333 service::espnow::enable (config);
3434}
Original file line number Diff line number Diff line change @@ -90,7 +90,9 @@ uint32_t getVersion() {
9090}
9191
9292size_t getMaxDataLength () {
93- return getVersion () >= 2 ? MAX_DATA_LEN_V2 : MAX_DATA_LEN_V1;
93+ auto v = getVersion ();
94+ if (v == 0 ) return 0 ;
95+ return v >= 2 ? MAX_DATA_LEN_V2 : MAX_DATA_LEN_V1;
9496}
9597
9698}
You can’t perform that action at this time.
0 commit comments