SRSUE: SRSUE: fix timealigmenttimer
This commit is contained in:
parent
bcde542111
commit
1fa5a19a55
|
@ -176,6 +176,8 @@ public:
|
|||
|
||||
void set(uint32_t duration_) { impl()->set(duration_); }
|
||||
|
||||
bool is_set() const { return (impl()->duration != 0); }
|
||||
|
||||
bool is_running() const { return impl()->is_running(); }
|
||||
|
||||
bool is_expired() const { return impl()->is_expired(); }
|
||||
|
|
|
@ -480,6 +480,7 @@ struct mac_cfg_t {
|
|||
void set_defaults()
|
||||
{
|
||||
rach_cfg.reset();
|
||||
sr_cfg.reset();
|
||||
set_mac_main_cfg_default();
|
||||
}
|
||||
|
||||
|
@ -487,7 +488,6 @@ struct mac_cfg_t {
|
|||
{
|
||||
bsr_cfg.reset();
|
||||
phr_cfg.reset();
|
||||
sr_cfg.reset();
|
||||
harq_cfg.reset();
|
||||
time_alignment_timer = -1;
|
||||
}
|
||||
|
@ -497,7 +497,7 @@ struct mac_cfg_t {
|
|||
sr_cfg_t sr_cfg;
|
||||
rach_cfg_t rach_cfg;
|
||||
ul_harq_cfg_t harq_cfg;
|
||||
int time_alignment_timer;
|
||||
int time_alignment_timer = -1;
|
||||
};
|
||||
|
||||
/***************************
|
||||
|
|
|
@ -272,9 +272,12 @@ bool demux::process_ce(srslte::sch_subh *subh) {
|
|||
break;
|
||||
case srslte::sch_subh::TA_CMD:
|
||||
phy_h->set_timeadv(subh->get_ta_cmd());
|
||||
Info("Received TA=%d\n", subh->get_ta_cmd());
|
||||
// Start or restart timeAlignmentTimer only if running
|
||||
if (time_alignment_timer->is_running()) {
|
||||
Info("Received TA=%d (%d/%d) \n",
|
||||
subh->get_ta_cmd(),
|
||||
time_alignment_timer->value(),
|
||||
time_alignment_timer->duration());
|
||||
// Start or restart timeAlignmentTimer only if set
|
||||
if (time_alignment_timer->is_set()) {
|
||||
time_alignment_timer->run();
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -2723,6 +2723,10 @@ void rrc::set_phy_default_pucch_srs()
|
|||
{
|
||||
rrc_log->info("Setting default PHY config dedicated\n");
|
||||
set_phy_config_dedicated_default();
|
||||
|
||||
// SR configuration affects to MAC SR too
|
||||
current_mac_cfg.sr_cfg.reset();
|
||||
mac->set_config(current_mac_cfg);
|
||||
}
|
||||
|
||||
void rrc::set_mac_default() {
|
||||
|
|
Loading…
Reference in New Issue