Adding additional products to threshold, scale, offset and number of levels in product description

This commit is contained in:
Dan Paulat 2022-04-08 23:46:45 -05:00
parent 8d1be0f54a
commit 6fc1f89fb1

View file

@ -298,7 +298,7 @@ uint16_t ProductDescriptionBlock::y_resolution_raw() const
uint16_t ProductDescriptionBlock::threshold() const uint16_t ProductDescriptionBlock::threshold() const
{ {
uint16_t threshold = 0; uint16_t threshold = 1;
switch (p->productCode_) switch (p->productCode_)
{ {
@ -320,14 +320,18 @@ uint16_t ProductDescriptionBlock::threshold() const
threshold = 2; threshold = 2;
break; break;
case 193: case 138:
threshold = 3; threshold = p->halfword31_;
break; break;
case 155: case 155:
threshold = 129; threshold = 129;
break; break;
case 193:
threshold = 3;
break;
case 159: case 159:
case 161: case 161:
case 163: case 163:
@ -427,6 +431,10 @@ float ProductDescriptionBlock::scale() const
scale = p->halfword32_; scale = p->halfword32_;
break; break;
case 138:
scale = p->halfword32_ * 0.01;
break;
case 159: case 159:
case 161: case 161:
case 163: case 163:
@ -447,10 +455,49 @@ float ProductDescriptionBlock::scale() const
uint16_t ProductDescriptionBlock::number_of_levels() const uint16_t ProductDescriptionBlock::number_of_levels() const
{ {
uint16_t numberOfLevels = 1u; uint16_t numberOfLevels = 16u;
switch (p->productCode_) 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 32:
case 81: case 81:
case 93: case 93:
@ -467,6 +514,18 @@ uint16_t ProductDescriptionBlock::number_of_levels() const
numberOfLevels = p->halfword33_; numberOfLevels = p->halfword33_;
break; break;
case 113:
numberOfLevels = 13;
break;
case 132:
numberOfLevels = 11;
break;
case 133:
numberOfLevels = 12;
break;
case 134: case 134:
numberOfLevels = 254; numberOfLevels = 254;
break; break;
@ -475,6 +534,10 @@ uint16_t ProductDescriptionBlock::number_of_levels() const
numberOfLevels = 199; numberOfLevels = 199;
break; break;
case 138:
numberOfLevels = p->halfword33_;
break;
case 159: case 159:
case 161: case 161:
case 163: case 163:
@ -488,6 +551,11 @@ uint16_t ProductDescriptionBlock::number_of_levels() const
case 176: case 176:
numberOfLevels = p->halfword36_; numberOfLevels = p->halfword36_;
break; break;
case 178:
case 179:
numberOfLevels = 71;
break;
} }
return numberOfLevels; return numberOfLevels;