mirror of
				https://github.com/brmlab/osmo-tetra.git
				synced 2025-10-30 23:14:00 +01:00 
			
		
		
		
	float_to_bits: Remove offset
This is a symptom of frequency offset and it's the demodulator job to correct this ... Thanks to Frank A. Stevenson for noticing this legacy hack Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
		
							parent
							
								
									095e7bd8aa
								
							
						
					
					
						commit
						2ee4b4ad4d
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		|  | @ -30,10 +30,9 @@ | ||||||
| #include <sys/types.h> | #include <sys/types.h> | ||||||
| #include <sys/stat.h> | #include <sys/stat.h> | ||||||
| 
 | 
 | ||||||
| static int process_sym_fl(float offset, float fl) | static int process_sym_fl(float fl) | ||||||
| { | { | ||||||
| 	int ret; | 	int ret; | ||||||
| 	fl += offset; |  | ||||||
| 
 | 
 | ||||||
| 	/* very simplistic scheme */ | 	/* very simplistic scheme */ | ||||||
| 	if (fl > 2) | 	if (fl > 2) | ||||||
|  | @ -113,7 +112,7 @@ int main(int argc, char **argv) | ||||||
| 			exit(1); | 			exit(1); | ||||||
| 		} else if (rc == 0) | 		} else if (rc == 0) | ||||||
| 			break; | 			break; | ||||||
| 		rc = process_sym_fl(0.3f, fl); | 		rc = process_sym_fl(fl); | ||||||
| 		sym_int2bits(rc, bits); | 		sym_int2bits(rc, bits); | ||||||
| 		//printf("%2d %1u %1u  %f\n", rc, bits[0], bits[1], fl);
 | 		//printf("%2d %1u %1u  %f\n", rc, bits[0], bits[1], fl);
 | ||||||
| 		if (opt_verbose) | 		if (opt_verbose) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Sylvain Munaut
						Sylvain Munaut