-
Notifications
You must be signed in to change notification settings - Fork 151
Open
Description
Checklist
- Checked the issue tracker for similar issues to ensure this is not a duplicate.
- Provided a clear description of your suggestion.
- Included any relevant context or examples.
Issue or Suggestion Description
当使用多sta数据时, 计算硬件增益没有进行区分不同sta,
求问: 1. 从专业角度,是否需要区分
2.如果需要区分时需要使用哪个接口, 或者baseline 是如何计算的。
const wifi_pkt_rx_ctrl_t *rx_ctrl = &data->rx_ctrl;
static int s_count = 0;
static std::map<char[], int> mac_s_count_map = {};
wifi_csi_info_t d = data[0];
char mac[20] = {0};
sprintf(mac, "%02X:%02X:%02X:%02X:%02X:%02X", d.mac[0], d.mac[1], d.mac[2], d.mac[3], d.mac[4], d.mac[5]);
std::string mac_str(mac);
if (mac_s_count_map.find(mac) == mac_s_count_map.end()) {
mac_s_count_map[mac] = 0;
}
float compensate_gain = 1.0f;
static uint8_t agc_gain = 0;
static int8_t fft_gain = 0;
// #if CONFIG_GAIN_CONTROL
static uint8_t agc_gain_baseline = 0;
static int8_t fft_gain_baseline = 0;
esp_csi_gain_ctrl_get_rx_gain(rx_ctrl, &agc_gain, &fft_gain);
// if (s_count < GAIN_LOCK_CNT) {
if (mac_s_count_map[mac] < GAIN_LOCK_CNT) {
esp_csi_gain_ctrl_record_rx_gain(agc_gain, fft_gain);
// s_count++;
}
// else if (s_count == GAIN_LOCK_CNT)
else if (mac_s_count_map[mac] == GAIN_LOCK_CNT)
{
int err = esp_csi_gain_ctrl_get_rx_gain_baseline(&agc_gain_baseline, &fft_gain_baseline);
if (err!= ESP_OK) {
ESP_LOGI(project_type, "esp_csi_gain_ctrl_get_rx_gain_baseline failed, err %d \n", err);
}
#if CONFIG_FORCE_GAIN
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels