Skip to content

Commit

Permalink
Merge pull request #218 from brilliantlabsAR/dev
Browse files Browse the repository at this point in the history
dev
  • Loading branch information
siliconwitch authored May 31, 2023
2 parents 1bd6dee + 25f9ee9 commit e83f73e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ bool ble_are_tx_notifications_enabled(ble_tx_channel_t channel)
.offset = 0,
.p_value = &(value_buffer[0])};

if (ble_handles.connection == BLE_CONN_HANDLE_INVALID)
{
return false;
}

// Read the CCCD attribute value for one of the tx characteristics
switch (channel)
{
Expand Down Expand Up @@ -217,6 +222,11 @@ bool ble_send_raw_data(const uint8_t *bytes, size_t len)
return true;
}

// Send all REPL data before sending raw data
while (ble_send_repl_data() == false)
{
}

// Initialise the handle value parameters
ble_gatts_hvx_params_t hvx_params = {0};
hvx_params.handle = ble_handles.data_tx_notification.value_handle;
Expand Down
2 changes: 1 addition & 1 deletion micropython

0 comments on commit e83f73e

Please sign in to comment.