Tool/software:
I can successfully display a variable g_tempC
coming from the microcontroller, in GUI Composer Application v3 thermometer widget with the value property binding set from pm
and g_tempC
. I have a second thermometer widget with id thermometer_1 that I want to display Fahrenheit. To that end, I cannot get the bindingRegistry
example to work:
bindingRegistry.bind('widget.thermometer_1.value', 'streaming.g_tempC', value => { value*9/5 + 32; }, // getter: model -> target (C → F) value => { (value-32)*5/9; } // setter: target -> model (F → C) );
I have <script type="module" src="./app_0.js"></script>
at the top (third line actually) of my index.gui file.
I get an error saying the "Binding streaming.g_tempC does not exist". I've also tried "pm.g_tempC". I'm going off the scant example in the manual. So how do I correctly implement the bindingRegistry.bind example ? And then, do I need to fill in the value property of the Fahrenheit thermometer, and bind to something there too? I'm leaving it blank right now and otherwise don't know what to specify there.