(&mut self)
| 1490 | } |
| 1491 | |
| 1492 | async fn _set_rx_parameters(&mut self) -> Result<()> { |
| 1493 | trace!("Setting rx parameters"); |
| 1494 | let ds = self.device.get_device_session_mut()?; |
| 1495 | |
| 1496 | if ds.rx2_frequency != self.network_conf.rx2_frequency |
| 1497 | || ds.rx2_dr as u8 != self.network_conf.rx2_dr |
| 1498 | || ds.rx1_dr_offset as u8 != self.network_conf.rx1_dr_offset |
| 1499 | { |
| 1500 | let set = maccommand::rx_param_setup::request( |
| 1501 | self.network_conf.rx1_dr_offset, |
| 1502 | self.network_conf.rx2_frequency, |
| 1503 | self.network_conf.rx2_dr, |
| 1504 | ); |
| 1505 | self.mac_commands.push(set); |
| 1506 | } |
| 1507 | |
| 1508 | let dev_rx1_delay = ds.rx1_delay as u8; |
| 1509 | let req_rx1_delay = cmp::max( |
| 1510 | self.network_conf.rx1_delay, |
| 1511 | self.device_profile.rx1_delay as u8, |
| 1512 | ); |
| 1513 | |
| 1514 | if dev_rx1_delay != req_rx1_delay { |
| 1515 | let set = maccommand::rx_timing_setup::request(req_rx1_delay); |
| 1516 | self.mac_commands.push(set); |
| 1517 | } |
| 1518 | |
| 1519 | Ok(()) |
| 1520 | } |
| 1521 | |
| 1522 | async fn _set_tx_parameters(&mut self) -> Result<()> { |
| 1523 | trace!("Setting tx parameters"); |
no test coverage detected