# HG changeset patch # User Mychaela Falconia # Date 1507091405 0 # Node ID ec71c96581104ce1d9bcf1ef6533ac91e8c02022 # Parent 27a933036b4fe6f80b043419a7c0f7611f3268fc l1p_ctl.c: reconstruction complete, perfect match to original TCS211 object diff -r 27a933036b4f -r ec71c9658110 chipsetsw/layer1/p_cfile/l1p_ctl.c --- a/chipsetsw/layer1/p_cfile/l1p_ctl.c Wed Oct 04 04:03:00 2017 +0000 +++ b/chipsetsw/layer1/p_cfile/l1p_ctl.c Wed Oct 04 04:30:05 2017 +0000 @@ -1684,7 +1684,7 @@ #endif if (0==pm) // Check and filter illegal pm value by using last valid IL - current_IL = l1a_l1s_com.last_input_level[index].input_level; + current_IL = l1a_l1s_com.last_input_level[index].input_level - lna_value; else current_IL = -(pm - (used_agc - delta_drp_gain) + lna_value - l1ctl_get_g_magic(radio_freq)); @@ -1717,7 +1717,9 @@ &(l1a_l1s_com.last_input_level[index].lna_off), radio_freq); - l1a_l1s_com.last_input_level[index].input_level = new_IL; + l1a_l1s_com.last_input_level[index].input_level = new_IL + + l1a_l1s_com.last_input_level[index].lna_off * + l1ctl_get_lna_att(radio_freq); } // if radio freq is a neighbor beacon @@ -1729,7 +1731,9 @@ &(l1a_l1s_com.last_input_level[index].lna_off), radio_freq); - l1a_l1s_com.last_input_level[index].input_level = (UWORD8)current_IL; + l1a_l1s_com.last_input_level[index].input_level = current_IL + + l1a_l1s_com.last_input_level[index].lna_off * + l1ctl_get_lna_att(radio_freq); } return((UWORD8)current_calibrated_IL);