
Originally Posted by
Grrrmachine
It's quite a learning curve for a non-programmer like me, but I'm getting there
I got the slider working on the standard screen, but is there a way of setting the minimum value as well as the max?
Next question regards Input Types.
RRFusion outlines 7 types (raw voltage, thermometer, accelerometer etc). Is there any way to set your own? As in 1V = a value of 0, 2V = 100, and RRFusion auto-converts input voltage to display?
Lightbulb moment! I realized why there's no minimum value, because there can be no negative slider value. So the effective range for sliders depends again on your sensor type, and you would have to skin based on what the data range is. For instance a slider with 0 value on a temp sensor should be skinned displaying -25°C (which i believe is the lowest the temp sensor goes). The slider is just a visual instrument to display current data based on effective range of the sensor.
As for your other request, i'm having trouble visualizing how i can add something to make this work. You could theorectically use threshold monitoring to set a label to your desired numeric equivalent i guess. Something along the lines of this
Code:
<threshold id="1">
<Title>Set Numeral Label to 0</Title>
<FusionBrainID>1</FusionBrainID>
<Port>0</Port>
<Type>Values</Type>
<Operator>LT</Operator>
<Limit>1</Limit>
<ExceedAction>SETLABEL;CUSTOMLABEL;0</ExceedAction>
<ExceedParameter>
</ExceedParameter>
<ReturnAction>NOTHING</ReturnAction>
<ReturnParameter>
</ReturnParameter>
<Icon>100</Icon>
<Style>Regular</Style>
</threshold>
If this was in thresholds.xml, each time a analog sensor 0 read less than 1 volts a label named CUSTOMLABEL would display 0. You could set up your next threshold so that anytime the same port read 2 volts that same CUSTOMLABEL would display 100. So on, so forth...
If you had the ability to enter a custom formula to use analog sensor raw data (0-1023), what would it look like? Maybe that would help me implement a custom sensor value field.
Bookmarks