Skip to content

Commit

Permalink
Merge branch 'bugfix/handle_signed_power_level_pcl_v5.1' into 'releas…
Browse files Browse the repository at this point in the history
…e/v5.1'

fix(nimble): Fix data type of power level and delta to handle negative values (v5.1)

See merge request espressif/esp-idf!24712
  • Loading branch information
jack0c committed Jul 12, 2023
2 parents cadf80e + fa8f992 commit e27b44e
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 e27b44e

Please sign in to comment.