Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

application: nrf5340_audio: Fix num_conn not initialized #12019

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static void connected_cb(struct bt_conn *conn, uint8_t err)
{
int ret;
char addr[BT_ADDR_LE_STR_LEN];
uint8_t num_conn;
uint8_t num_conn = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uint8_t num_conn = 0;
uint8_t num_conn = 0U;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We generally do not use 'U' in the audio application

uint16_t conn_handle;
enum ble_hci_vs_tx_power conn_tx_pwr;
struct bt_mgmt_msg msg;
Expand Down
1 change: 1 addition & 0 deletions applications/nrf5340_audio/src/bluetooth/le_audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <zephyr/bluetooth/audio/audio.h>
#include <audio_defines.h>

#define LE_AUDIO_ZBUS_EVENT_WAIT_TIME K_MSEC(5)
#define LE_AUDIO_SDU_SIZE_OCTETS(bitrate) (bitrate / (1000000 / CONFIG_AUDIO_FRAME_DURATION_US) / 8)

#if (CONFIG_AUDIO_SAMPLE_RATE_48000_HZ)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static void le_audio_event_publish(enum le_audio_evt_type event)

msg.event = event;

ret = zbus_chan_pub(&le_audio_chan, &msg, K_NO_WAIT);
ret = zbus_chan_pub(&le_audio_chan, &msg, LE_AUDIO_ZBUS_EVENT_WAIT_TIME);
ERR_CHK(ret);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static void le_audio_event_publish(enum le_audio_evt_type event)

msg.event = event;

ret = zbus_chan_pub(&le_audio_chan, &msg, K_NO_WAIT);
ret = zbus_chan_pub(&le_audio_chan, &msg, LE_AUDIO_ZBUS_EVENT_WAIT_TIME);
ERR_CHK(ret);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ static void le_audio_event_publish(enum le_audio_evt_type event, struct bt_conn
msg.event = event;
msg.conn = conn;

ret = zbus_chan_pub(&le_audio_chan, &msg, K_NO_WAIT);
ret = zbus_chan_pub(&le_audio_chan, &msg, LE_AUDIO_ZBUS_EVENT_WAIT_TIME);
ERR_CHK(ret);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static void le_audio_event_publish(enum le_audio_evt_type event, struct bt_conn
msg.event = event;
msg.conn = conn;

ret = zbus_chan_pub(&le_audio_chan, &msg, K_NO_WAIT);
ret = zbus_chan_pub(&le_audio_chan, &msg, LE_AUDIO_ZBUS_EVENT_WAIT_TIME);
ERR_CHK(ret);
}

Expand Down
Loading