mirror of https://github.com/ARMmbed/mbed-os.git
				
				
				
			LoRaPHY: Pass frequency set in rx_config() to caller
In AU/CN/US PHY, RX1 slot frequency is calculated in rx_config(). Since the caller is printing it to log, modify the frequency in parameter structure so that the correct value will be printed.pull/10867/head
							parent
							
								
									aa9bd486d5
								
							
						
					
					
						commit
						feb19eb035
					
				| 
						 | 
				
			
			@ -355,6 +355,8 @@ bool LoRaPHYAU915::rx_config(rx_config_params_t *params)
 | 
			
		|||
        // Apply window 1 frequency
 | 
			
		||||
        frequency = AU915_FIRST_RX1_CHANNEL
 | 
			
		||||
                    + (params->channel % 8) * AU915_STEPWIDTH_RX1_CHANNEL;
 | 
			
		||||
        // Caller may print the frequency to log so update it to match actual frequency
 | 
			
		||||
        params->frequency = frequency;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // Read the physical datarate from the datarates table
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -377,6 +377,8 @@ bool LoRaPHYCN470::rx_config(rx_config_params_t *config)
 | 
			
		|||
    if (config->rx_slot == RX_SLOT_WIN_1) {
 | 
			
		||||
        // Apply window 1 frequency
 | 
			
		||||
        frequency = CN470_FIRST_RX1_CHANNEL + (config->channel % 48) * CN470_STEPWIDTH_RX1_CHANNEL;
 | 
			
		||||
        // Caller may print the frequency to log so update it to match actual frequency
 | 
			
		||||
        config->frequency = frequency;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // Read the physical datarate from the datarates table
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -374,6 +374,8 @@ bool LoRaPHYUS915::rx_config(rx_config_params_t *config)
 | 
			
		|||
    if (config->rx_slot == RX_SLOT_WIN_1) {
 | 
			
		||||
        // Apply window 1 frequency
 | 
			
		||||
        frequency = US915_FIRST_RX1_CHANNEL + (config->channel % 8) * US915_STEPWIDTH_RX1_CHANNEL;
 | 
			
		||||
        // Caller may print the frequency to log so update it to match actual frequency
 | 
			
		||||
        config->frequency = frequency;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // Read the physical datarate from the datarates table
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue