Merge branch 'bugfix/voicetransmit' into develop fixes #37

feature/IPV6_#35_Reboot
Geoffrey Merck 3 years ago
commit 1b393f207c

@ -109,7 +109,8 @@
"type": "cppdbg", "type": "cppdbg",
"request": "launch", "request": "launch",
"program": "${workspaceFolder}/DGWVoiceTransmit/dgwvoicetransmit", "program": "${workspaceFolder}/DGWVoiceTransmit/dgwvoicetransmit",
"args": ["F4FXL B", "${workspaceFolder}/Sandbox/Announce_F5ZEE__B.dvtool", "-text", "www.F5KAV.fr", "-dprs", "!4858.72N/00736.91Er/"], "args": ["F5ZEE B", "${workspaceFolder}/Sandbox/french_male.dvtool", "${workspaceFolder}/Sandbox/german_male.dvtool", "-text", "abcdefghij", "-dprs", "!4858.72N/00736.91Er/"],
//"args": ["F5ZEE B", "${workspaceFolder}/Sandbox/french_male.dvtool", "${workspaceFolder}/Sandbox/german_male.dvtool"],
"stopAtEntry": false, "stopAtEntry": false,
"cwd": "${workspaceFolder}", "cwd": "${workspaceFolder}",
"environment": [], "environment": [],

@ -132,9 +132,11 @@ bool CVoiceTransmit::run()
header->setRptCall2(m_callsign); header->setRptCall2(m_callsign);
header->setDestination(address, G2_DV_PORT); header->setDestination(address, G2_DV_PORT);
if(!m_text.empty()) { bool overrideSlowData = !m_text.empty();
if(overrideSlowData) {
slowData = new CSlowDataEncoder(); slowData = new CSlowDataEncoder();
// slowData->setHeaderData(*header); slowData->setHeaderData(*header);
if(!m_text.empty()) slowData->setTextData(m_text); if(!m_text.empty()) slowData->setTextData(m_text);
if(!m_dprs.empty()) slowData->setGPSData(m_dprs); if(!m_dprs.empty()) slowData->setGPSData(m_dprs);
} }
@ -152,6 +154,7 @@ bool CVoiceTransmit::run()
while (loop) { while (loop) {
unsigned int needed = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now() - start).count(); unsigned int needed = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now() - start).count();
needed /= DSTAR_FRAME_TIME_MS; needed /= DSTAR_FRAME_TIME_MS;
unsigned char buffer[DV_FRAME_LENGTH_BYTES];
while (out < needed) { while (out < needed) {
CAMBEData* ambe = m_store->getAMBE(); CAMBEData* ambe = m_store->getAMBE();
@ -172,20 +175,15 @@ bool CVoiceTransmit::run()
break; break;
} }
if(slowData != nullptr) { // Override slowdata if specified so ambe->getData(buffer, DV_FRAME_LENGTH_BYTES);
unsigned char buffer[DV_FRAME_LENGTH_BYTES]; // Insert sync bytes when the sequence number is zero, slow data otherwise
ambe->getData(buffer, DV_FRAME_LENGTH_BYTES); if (seqNo == 0U) {
::memcpy(buffer + VOICE_FRAME_LENGTH_BYTES, DATA_SYNC_BYTES, DATA_FRAME_LENGTH_BYTES);
// Insert sync bytes when the sequence number is zero, slow data otherwise } else if (overrideSlowData) {
if (seqNo == 0U) { slowData->getInterleavedData(buffer + VOICE_FRAME_LENGTH_BYTES);
::memcpy(buffer + VOICE_FRAME_LENGTH_BYTES, DATA_SYNC_BYTES, DATA_FRAME_LENGTH_BYTES);
} else {
slowData->getInterleavedData(buffer + VOICE_FRAME_LENGTH_BYTES);
}
ambe->setData(buffer, DV_FRAME_LENGTH_BYTES);
} }
ambe->setData(buffer, DV_FRAME_LENGTH_BYTES);
ambe->setSeq(seqNo); ambe->setSeq(seqNo);
ambe->setDestination(address, G2_DV_PORT); ambe->setDestination(address, G2_DV_PORT);
ambe->setEnd(false); ambe->setEnd(false);

@ -145,6 +145,7 @@ The testing framwework used is Google Test.
# 5. Version History # 5. Version History
## 5.1. Version 0.7 ## 5.1. Version 0.7
- [**Bugfix**] Fix #37 Unable to transmit multiple files (DGWVoiceTransmit) ([#37](https://github.com/F4FXL/DStarGateway/issues/37))
- [**Bugfix**] Unknow repeater entries in log when using Icom Hardware ([#34](https://github.com/F4FXL/DStarGateway/issues/34)) - [**Bugfix**] Unknow repeater entries in log when using Icom Hardware ([#34](https://github.com/F4FXL/DStarGateway/issues/34))
- [**Bugfix**] Malformed callsign in some cases when using DV-G (NMEA) ([#33](https://github.com/F4FXL/DStarGateway/issues/33)) - [**Bugfix**] Malformed callsign in some cases when using DV-G (NMEA) ([#33](https://github.com/F4FXL/DStarGateway/issues/33))
- [**Bugfix**] Crash on startup with Icom Hardware. Thanks to Josh AB9FT for reporting the issue.([#31](https://github.com/F4FXL/DStarGateway/issues/31)) - [**Bugfix**] Crash on startup with Icom Hardware. Thanks to Josh AB9FT for reporting the issue.([#31](https://github.com/F4FXL/DStarGateway/issues/31))

Loading…
Cancel
Save

Powered by TurnKey Linux.