From c728e4fac8e5eed990dd978ba866f1bab7830ca1 Mon Sep 17 00:00:00 2001 From: Loren Norman Date: Tue, 19 Aug 2025 14:05:08 -0400 Subject: [PATCH] add expression output to constrain and map --- app/blocks/math/constrain.js | 2 +- app/blocks/math/map.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/blocks/math/constrain.js b/app/blocks/math/constrain.js index 1c6a308..ae1e6f8 100644 --- a/app/blocks/math/constrain.js +++ b/app/blocks/math/constrain.js @@ -7,7 +7,7 @@ export default { description: "Keep any number within specified minimum and maximum boundaries. If the input value is below the minimum, it becomes the minimum. If above the maximum, it becomes the maximum. Perfect for ensuring values stay within expected ranges, creating percentage bounds, or limiting user input to acceptable values.", connections: { mode: "value", - output: "number", + output: [ "expression", "number" ], }, template: ` Constrain %VALUE diff --git a/app/blocks/math/map.js b/app/blocks/math/map.js index b704040..4255306 100644 --- a/app/blocks/math/map.js +++ b/app/blocks/math/map.js @@ -7,7 +7,7 @@ export default { description: "Transform sensor readings and data values by scaling them from one number range to another. Essential for IoT projects that need to convert raw sensor data (like 0-1023 from Arduino analog pins) into meaningful units (like 0-100% humidity), or translate between different measurement systems. Perfect for normalizing data, creating percentage values, or adapting sensor outputs to match your specific needs.", connections: { mode: "value", - output: "number", + output: [ "expression", "number" ], }, template: ` Map