mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 00:10:06 +00:00 
			
		
		
		
	Adding additional products to threshold, scale, offset and number of levels in product description
This commit is contained in:
		
							parent
							
								
									8d1be0f54a
								
							
						
					
					
						commit
						6fc1f89fb1
					
				
					 1 changed files with 72 additions and 4 deletions
				
			
		|  | @ -298,7 +298,7 @@ uint16_t ProductDescriptionBlock::y_resolution_raw() const | |||
| 
 | ||||
| uint16_t ProductDescriptionBlock::threshold() const | ||||
| { | ||||
|    uint16_t threshold = 0; | ||||
|    uint16_t threshold = 1; | ||||
| 
 | ||||
|    switch (p->productCode_) | ||||
|    { | ||||
|  | @ -320,14 +320,18 @@ uint16_t ProductDescriptionBlock::threshold() const | |||
|       threshold = 2; | ||||
|       break; | ||||
| 
 | ||||
|    case 193: | ||||
|       threshold = 3; | ||||
|    case 138: | ||||
|       threshold = p->halfword31_; | ||||
|       break; | ||||
| 
 | ||||
|    case 155: | ||||
|       threshold = 129; | ||||
|       break; | ||||
| 
 | ||||
|    case 193: | ||||
|       threshold = 3; | ||||
|       break; | ||||
| 
 | ||||
|    case 159: | ||||
|    case 161: | ||||
|    case 163: | ||||
|  | @ -427,6 +431,10 @@ float ProductDescriptionBlock::scale() const | |||
|       scale = p->halfword32_; | ||||
|       break; | ||||
| 
 | ||||
|    case 138: | ||||
|       scale = p->halfword32_ * 0.01; | ||||
|       break; | ||||
| 
 | ||||
|    case 159: | ||||
|    case 161: | ||||
|    case 163: | ||||
|  | @ -447,10 +455,49 @@ float ProductDescriptionBlock::scale() const | |||
| 
 | ||||
| uint16_t ProductDescriptionBlock::number_of_levels() const | ||||
| { | ||||
|    uint16_t numberOfLevels = 1u; | ||||
|    uint16_t numberOfLevels = 16u; | ||||
| 
 | ||||
|    switch (p->productCode_) | ||||
|    { | ||||
|    case 19: | ||||
|    case 20: | ||||
|    case 27: | ||||
|    case 31: | ||||
|    case 37: | ||||
|    case 38: | ||||
|    case 41: | ||||
|    case 49: | ||||
|    case 50: | ||||
|    case 51: | ||||
|    case 56: | ||||
|    case 57: | ||||
|    case 78: | ||||
|    case 79: | ||||
|    case 80: | ||||
|    case 97: | ||||
|    case 98: | ||||
|    case 137: | ||||
|    case 144: | ||||
|    case 145: | ||||
|    case 146: | ||||
|    case 147: | ||||
|    case 150: | ||||
|    case 151: | ||||
|    case 169: | ||||
|    case 171: | ||||
|       numberOfLevels = 16; | ||||
|       break; | ||||
| 
 | ||||
|    case 30: | ||||
|    case 65: | ||||
|    case 66: | ||||
|    case 67: | ||||
|    case 84: | ||||
|    case 86: | ||||
|    case 90: | ||||
|       numberOfLevels = 8; | ||||
|       break; | ||||
| 
 | ||||
|    case 32: | ||||
|    case 81: | ||||
|    case 93: | ||||
|  | @ -467,6 +514,18 @@ uint16_t ProductDescriptionBlock::number_of_levels() const | |||
|       numberOfLevels = p->halfword33_; | ||||
|       break; | ||||
| 
 | ||||
|    case 113: | ||||
|       numberOfLevels = 13; | ||||
|       break; | ||||
| 
 | ||||
|    case 132: | ||||
|       numberOfLevels = 11; | ||||
|       break; | ||||
| 
 | ||||
|    case 133: | ||||
|       numberOfLevels = 12; | ||||
|       break; | ||||
| 
 | ||||
|    case 134: | ||||
|       numberOfLevels = 254; | ||||
|       break; | ||||
|  | @ -475,6 +534,10 @@ uint16_t ProductDescriptionBlock::number_of_levels() const | |||
|       numberOfLevels = 199; | ||||
|       break; | ||||
| 
 | ||||
|    case 138: | ||||
|       numberOfLevels = p->halfword33_; | ||||
|       break; | ||||
| 
 | ||||
|    case 159: | ||||
|    case 161: | ||||
|    case 163: | ||||
|  | @ -488,6 +551,11 @@ uint16_t ProductDescriptionBlock::number_of_levels() const | |||
|    case 176: | ||||
|       numberOfLevels = p->halfword36_; | ||||
|       break; | ||||
| 
 | ||||
|    case 178: | ||||
|    case 179: | ||||
|       numberOfLevels = 71; | ||||
|       break; | ||||
|    } | ||||
| 
 | ||||
|    return numberOfLevels; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat