Skip to content

Commit

Permalink
stashed
Browse files Browse the repository at this point in the history
  • Loading branch information
wh201906 committed Mar 9, 2024
1 parent da9f2ca commit 709f655
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -781,9 +781,9 @@ qint64 Connection::write(const char *data, qint64 len)
else if(m_type == BLE_Central)
{
if(m_BLERxTxMode == BLE_2S2C)
m_BLETxService->writeCharacteristic(m_BLETxCharacteristic, QByteArray::fromRawData(data, len));
m_BLETxService->writeCharacteristic(m_BLETxCharacteristic, QByteArray::fromRawData(data, len), QLowEnergyService::WriteWithoutResponse);
else
m_BLERxTxService->writeCharacteristic(m_BLETxCharacteristic, QByteArray::fromRawData(data, len));
m_BLERxTxService->writeCharacteristic(m_BLETxCharacteristic, QByteArray::fromRawData(data, len), QLowEnergyService::WriteWithoutResponse);
return len; // no feedback
}
else if(m_type == TCP_Client)
Expand Down Expand Up @@ -1248,7 +1248,7 @@ void Connection::BLEC_onServiceDetailDiscovered(QLowEnergyService::ServiceState
{
for(auto it = chars.cbegin(); it != chars.cend(); ++it)
{
if(!m_BLERxCharacteristicValid && it->uuid() == m_currBTArgument.RxCharacteristicUUID && it->properties().testFlag(QLowEnergyCharacteristic::Notify) && it->properties().testFlag(QLowEnergyCharacteristic::Write))
if(!m_BLERxCharacteristicValid && it->uuid() == m_currBTArgument.RxCharacteristicUUID && it->properties().testFlag(QLowEnergyCharacteristic::Notify) && it->properties().testFlag(QLowEnergyCharacteristic::WriteNoResponse))
{
m_BLERxCharacteristicValid = true;
m_BLETxCharacteristicValid = true;
Expand All @@ -1265,7 +1265,7 @@ void Connection::BLEC_onServiceDetailDiscovered(QLowEnergyService::ServiceState
m_BLERxCharacteristicValid = true;
deleteService = false;
}
if(!m_BLETxCharacteristicValid && it->uuid() == m_currBTArgument.TxCharacteristicUUID && it->properties().testFlag(QLowEnergyCharacteristic::Write))
if(!m_BLETxCharacteristicValid && it->uuid() == m_currBTArgument.TxCharacteristicUUID && it->properties().testFlag(QLowEnergyCharacteristic::WriteNoResponse))
{
m_BLETxCharacteristicValid = true;
deleteService = false;
Expand All @@ -1287,7 +1287,7 @@ void Connection::BLEC_onServiceDetailDiscovered(QLowEnergyService::ServiceState
{
for(auto it = chars.cbegin(); it != chars.cend(); ++it)
{
if(!m_BLETxCharacteristicValid && it->uuid() == m_currBTArgument.TxCharacteristicUUID && it->properties().testFlag(QLowEnergyCharacteristic::Write))
if(!m_BLETxCharacteristicValid && it->uuid() == m_currBTArgument.TxCharacteristicUUID && it->properties().testFlag(QLowEnergyCharacteristic::WriteNoResponse))
{
m_BLETxCharacteristicValid = true;
deleteService = false;
Expand Down

0 comments on commit 709f655

Please sign in to comment.