From 0fc1b3a2bb4c73729eaf5e7220d03c04badd2aff Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Sun, 10 Apr 2022 21:41:10 -0500 Subject: [PATCH] Product code 34 doesn't use data level threshold halfwords --- scwx-qt/source/scwx/qt/view/level3_product_view.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scwx-qt/source/scwx/qt/view/level3_product_view.cpp b/scwx-qt/source/scwx/qt/view/level3_product_view.cpp index 54e68fd4..5f380044 100644 --- a/scwx-qt/source/scwx/qt/view/level3_product_view.cpp +++ b/scwx-qt/source/scwx/qt/view/level3_product_view.cpp @@ -148,9 +148,10 @@ void Level3ProductView::UpdateColorTable() return; } - float offset = descriptionBlock->offset(); - float scale = descriptionBlock->scale(); - uint16_t threshold = descriptionBlock->threshold(); + int16_t productCode = descriptionBlock->product_code(); + float offset = descriptionBlock->offset(); + float scale = descriptionBlock->scale(); + uint16_t threshold = descriptionBlock->threshold(); // If the threshold is 2, the range min should be set to 1 for range folding uint16_t rangeMin = std::min(1, threshold); @@ -184,7 +185,7 @@ void Level3ProductView::UpdateColorTable() float f; // Different products use different scale/offset formulas - if (numberOfLevels > 16) + if (numberOfLevels > 16 || productCode == 34) { if (i == RANGE_FOLDED && threshold > RANGE_FOLDED) {