--[[ ======================================== VALUE ADJUSTMENT (Scale & Offset) ======================================== PURPOSE: Adjusts input values using scaling and offset. FORMULA: output = (input * SCALE) + OFFSET EXAMPLE: SCALE = 2, OFFSET = 5 Input: 100 → Output: 205 USER ACTION: Modify SCALE and OFFSET in the USER EDIT SECTION below. ======================================== ]] function ValueAdjustment(input) if input == nil then return {} end local output = {} ------------------------------------------------- -- USER EDIT SECTION ------------------------------------------------- local SCALE = 1.5 -- Change multiplier here local OFFSET = 10 -- Change offset here ------------------------------------------------- for tag = 1, 10 do local key = tostring(tag) local inVec = input[key] if type(inVec) == "table" then local outVec = {} for i, v in ipairs(inVec) do local val = (v.value or 0) * SCALE + OFFSET table.insert(outVec, { value = val, quality = v.quality or 0, timestamp = v.timestamp or 0 }) end output[key] = outVec end end return output end