This is an automated email from the ASF dual-hosted git repository. andk pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
The following commit(s) were added to refs/heads/master by this push: new b2ebf763 nimble/host: Fix data type of power level and delta to handle negative values b2ebf763 is described below commit b2ebf7630d27dfcd01927e8abbc126ff80de62b6 Author: Rahul Tank <rahul.t...@espressif.com> AuthorDate: Thu Jun 8 13:17:43 2023 +0530 nimble/host: Fix data type of power level and delta to handle negative values --- nimble/host/include/host/ble_gap.h | 8 ++++---- nimble/include/nimble/hci_common.h | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/nimble/host/include/host/ble_gap.h b/nimble/host/include/host/ble_gap.h index bf40236e..c6d9dc81 100644 --- a/nimble/host/include/host/ble_gap.h +++ b/nimble/host/include/host/ble_gap.h @@ -1068,14 +1068,14 @@ struct ble_gap_event { /** Advertising PHY */ uint8_t phy; - /** Transmit power Level */ - uint8_t transmit_power_level; + /** Transmit power Level */ + int8_t transmit_power_level; /** Transmit Power Level Flag */ uint8_t transmit_power_level_flag; - /** Delta indicating change in transmit Power Level */ - uint8_t delta; + /** Delta indicating change in transmit Power Level */ + int8_t delta; } transmit_power; #endif /** diff --git a/nimble/include/nimble/hci_common.h b/nimble/include/nimble/hci_common.h index db364db8..ca0c219e 100644 --- a/nimble/include/nimble/hci_common.h +++ b/nimble/include/nimble/hci_common.h @@ -1937,14 +1937,14 @@ struct ble_hci_ev_le_subev_path_loss_threshold { #define BLE_HCI_LE_SUBEV_TRANSMIT_POWER_REPORT (0x21) struct ble_hci_ev_le_subev_transmit_power_report { - uint8_t subev_code; - uint8_t status; + uint8_t subev_code; + uint8_t status; uint16_t conn_handle; - uint8_t reason; - uint8_t phy; - uint8_t transmit_power_level; - uint8_t transmit_power_level_flag; - uint8_t delta; + uint8_t reason; + uint8_t phy; + int8_t transmit_power_level; + uint8_t transmit_power_level_flag; + int8_t delta; } __attribute__((packed)); #define BLE_HCI_LE_SUBEV_BIGINFO_ADV_REPORT (0x22)