Skip to content

Commit

Permalink
Merge branch 'bugfix/handle_signed_power_level_pcl' into 'master'
Browse files Browse the repository at this point in the history
fix(nimble): Fix data type of power level and delta to handle negative values

See merge request espressif/esp-idf!24116
  • Loading branch information
rahult-github committed Jul 11, 2023
2 parents 9b17cce + b926bf5 commit f274a8b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion components/bt/host/nimble/nimble
4 changes: 2 additions & 2 deletions components/bt/porting/nimble/include/nimble/hci_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -1863,9 +1863,9 @@ struct ble_hci_ev_le_subev_transmit_power_report {
uint16_t conn_handle;
uint8_t reason;
uint8_t phy;
uint8_t transmit_power_level;
int8_t transmit_power_level;
uint8_t transmit_power_level_flag;
uint8_t delta;
int8_t delta;
} __attribute__((packed));

#define BLE_HCI_LE_SUBEV_BIGINFO_ADV_REPORT (0x22)
Expand Down
2 changes: 1 addition & 1 deletion examples/bluetooth/nimble/blecent/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ blecent_gap_event(struct ble_gap_event *event, void *arg)
#if MYNEWT_VAL(BLE_POWER_CONTROL)
case BLE_GAP_EVENT_TRANSMIT_POWER:
MODLOG_DFLT(INFO, "Transmit power event : status=%d conn_handle=%d reason=%d "
"phy=%d power_level=%x power_level_flag=%d delta=%d",
"phy=%d power_level=%d power_level_flag=%d delta=%d",
event->transmit_power.status,
event->transmit_power.conn_handle,
event->transmit_power.reason,
Expand Down

0 comments on commit f274a8b

Please sign in to comment.