mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-10-30 12:30:23 -04:00 
			
		
		
		
	Make wspr OSD decoding work with type 2 messages (extended callsign + power in dBm).
This commit is contained in:
		
							parent
							
								
									1a8ddad307
								
							
						
					
					
						commit
						db5c9e1fe9
					
				| @ -1254,7 +1254,7 @@ int main(int argc, char *argv[]) | |||||||
|             not_decoded=1; |             not_decoded=1; | ||||||
|             int osd_decode=0; |             int osd_decode=0; | ||||||
|             int ib=1, blocksize; |             int ib=1, blocksize; | ||||||
|             int n1,n2;   |             int n1,n2,n3,nadd,nu,ntype;   | ||||||
|             while( ib <= nblocksize && not_decoded ) { |             while( ib <= nblocksize && not_decoded ) { | ||||||
|                 blocksize=ib; |                 blocksize=ib; | ||||||
|                 idt=0; ii=0; |                 idt=0; ii=0; | ||||||
| @ -1311,17 +1311,23 @@ int main(int argc, char *argv[]) | |||||||
|                             unpack50(message,&n1,&n2); |                             unpack50(message,&n1,&n2); | ||||||
|                             if( !unpackcall(n1,callsign) ) break; |                             if( !unpackcall(n1,callsign) ) break; | ||||||
|                             callsign[12]=0; |                             callsign[12]=0; | ||||||
|                             ihash=nhash(callsign,strlen(callsign),(uint32_t)146); |                             ntype = (n2&127) - 64; | ||||||
|                             int ntype = (n2&127) - 64; |                             if( (ntype >= 0) && (ntype <= 62) ) { | ||||||
|                             if(strncmp(hashtab+ihash*13,callsign,13)==0   |                                 nu = ntype%10; | ||||||
|                                && (ntype >= 0) && (ntype <= 62) ) { |                                 if( !(nu == 0 || nu == 3 || nu == 7) ) { | ||||||
|                                 int nu = ntype%10; |                                    nadd=nu; | ||||||
|                                 if( nu == 0 || nu == 3 || nu == 7 ) { |                                    if( nu > 3 ) nadd=nu-3; | ||||||
|  |                                    if( nu > 7 ) nadd=nu-7; | ||||||
|  |                                    n3=n2/128+32768*(nadd-1); | ||||||
|  |                                    if( !unpackpfx(n3,callsign) ) break; | ||||||
|  |                                 } | ||||||
|  |                                 ihash=nhash(callsign,strlen(callsign),(uint32_t)146); | ||||||
|  |                                 if(strncmp(hashtab+ihash*13,callsign,13)==0) {   | ||||||
|                                    not_decoded=0; |                                    not_decoded=0; | ||||||
|                                    osd_decode =1; |                                    osd_decode =1; | ||||||
|                                    break; |                                    break; | ||||||
|                                 } |                                 } | ||||||
|                             } |                             }  | ||||||
|                         } |                         } | ||||||
|                      |                      | ||||||
|                     } |                     } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user