Simple math calc in Control Page

Posted on
Mon Mar 09, 2020 3:46 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Simple math calc in Control Page

I would like to request an ability to perform simple math/arithmetic calculations on a control page and use the result as a pseudo-variable to be displayed on that page.
This feature would allow the entry of a one line formula containing constants and Indigo variable references.
Eg: myVar1 + myVar2 (Or perhaps: %%v:123456%% + %%v:654321%% )

Syntax would be basic Python. The resulting value would be used as a pseudo variable in the control page.
The resulting variable would be treated like any other control page variable reference, allowing for captions, images, etc.

One possible implementation might add a Display: option with the formula contained in place of the For: pulldown.

A benefit of this feature would be reduction off the need to create, and maintain, variables that sare used solely for control page display purposes.
For example, if I have a variable "fuelBurned" that contains the amount of fuel burned in the previous 24 hours. I could create a pseudo variable "float(fuelBurned/24)"

EDIT: In a similar vein, it would be nice to be able to enter a formula in a Modify Variable action.
EDIT: On reflection, the pseudo variable would need to be refreshed any time one of the underlying variables changed.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests