mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-13 06:17:42 +00:00
BLE Rx parsing improvements (#1566)
* Running simple state machine to better catch in between buffers. * Fixed buffer size 2048 was too large for a decimated before only containing 512 (2048/4 Decimation) Bytes. * attempt at trying to minimize uncleared str buffers
This commit is contained in:
@@ -201,11 +201,12 @@ void BleRecentEntryDetailView::set_entry(const BleRecentEntry& entry) {
|
||||
|
||||
void BleRecentEntryDetailView::launch_bletx(BleRecentEntry packetEntry) {
|
||||
BLETxPacket bleTxPacket;
|
||||
memset(&bleTxPacket, 0, sizeof(BLETxPacket));
|
||||
|
||||
std::string macAddressStr = to_string_mac_address(packetEntry.packetData.macAddress, 6, true);
|
||||
|
||||
strncpy(bleTxPacket.macAddress, macAddressStr.c_str(), 13);
|
||||
strncpy(bleTxPacket.advertisementData, packetEntry.dataString.c_str(), (packetEntry.packetData.dataLen * 2) + 1);
|
||||
strncpy(bleTxPacket.macAddress, macAddressStr.c_str(), 12);
|
||||
strncpy(bleTxPacket.advertisementData, packetEntry.dataString.c_str(), packetEntry.packetData.dataLen * 2);
|
||||
strncpy(bleTxPacket.packetCount, "50", 3);
|
||||
bleTxPacket.packet_count = 50;
|
||||
|
||||
|
Reference in New Issue
Block a user