# RRFusion- My Fusion Brain plugin for RR

Show 40 post(s) from this thread on one page
• 09-16-2012, 05:01 PM
Grrrmachine
It's quite a learning curve for a non-programmer like me, but I'm getting there :D

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?
• 09-17-2012, 09:09 AM
Sonicxtacy02
Quote:

Originally Posted by Grrrmachine
It's quite a learning curve for a non-programmer like me, but I'm getting there :D

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?

Minimum value is not added (no idea why i left it out), but i'll add it now.

As for the other question, you wish to set your own range? voltages are read directly from the fusion brain, then translated depending on your type of sensor. I've been pondering adding a custom sensor type but no one to this point has had a use for it (those who wished to add a sensor thats not a "FB supported" sensor i've just added a new sensor type for). If you can provide me a sensor type and a formula i can do the same for you.
• 09-17-2012, 09:49 AM
Grrrmachine
Well, the reason I mention it is that I'll be measuring between six and nine different sensors in the car. Most will be simple variable resistors that I can set up as a voltage divider, but I'd prefer each voltage to have a different number value, therefore different numeric ranges. Plus there will be two values driven from frequency-to-voltage converters, so I need to find out what their output voltages will be as well. Seems a lot of work to send your way.
• 09-18-2012, 02:13 PM
Sonicxtacy02
Quote:

Originally Posted by Grrrmachine
It's quite a learning curve for a non-programmer like me, but I'm getting there :D

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.
• 09-18-2012, 04:03 PM
Grrrmachine
Since I'm free to choose the values of R2 in my voltage dividers, I'm free to determine the voltage range that my sensors will operate on. A basic example is this:

R1 is a variable sensor between 0 and 120 Ohms. At 120 Ohms it equates to 0 litres of fuel in the tank, at 0 Ohms it means 63 litres.

So it doesn't matter what value I place on R2, as it will just widen or narrow the range of input voltages. But if I've chosen a 60 Ohm resistor (for example), I just need to say "input voltage 1.1V = 0 litres, input voltage 3.3V = 63litres. Presumably 1.1V would equate to a raw data position of 310 (one third of 1023), so replace "1.1V" with 310 and "3.3V" with 1023, and you'd get the same principle.

This also affects the sliders, as it means I can configure sensors to deliver a value as close to 0V (and therefore 0 as a raw data point) as possible at one end of their scale to get the most out of the slider range.
• 09-19-2012, 03:38 PM
Sonicxtacy02
Quote:

Originally Posted by Grrrmachine
Since I'm free to choose the values of R2 in my voltage dividers, I'm free to determine the voltage range that my sensors will operate on. A basic example is this:

R1 is a variable sensor between 0 and 120 Ohms. At 120 Ohms it equates to 0 litres of fuel in the tank, at 0 Ohms it means 63 litres.

So it doesn't matter what value I place on R2, as it will just widen or narrow the range of input voltages. But if I've chosen a 60 Ohm resistor (for example), I just need to say "input voltage 1.1V = 0 litres, input voltage 3.3V = 63litres. Presumably 1.1V would equate to a raw data position of 310 (one third of 1023), so replace "1.1V" with 310 and "3.3V" with 1023, and you'd get the same principle.

This also affects the sliders, as it means I can configure sensors to deliver a value as close to 0V (and therefore 0 as a raw data point) as possible at one end of their scale to get the most out of the slider range.

You're honestly speaking a different language to me bud. Let me ponder on that for a moment lol

RRFusion for V6 brains is now fixed and available on autoappmart. https://autoappmart.com/products/RRF...ion+Brains_243
• 09-19-2012, 04:00 PM
Grrrmachine
haha, no problem. All I mean to say is, the FB accepts input voltages of 0-3.3V. I can build my sensors to input those voltages across any range I like, but I am clueless as to how to make RRFusion interpret those voltages.

For example, my 63 litre fuel tank. If I used your idea of Thresholds, would I have to input 64 individual thresholds just to make the Fuel Gauge show from 0 to 63 litres?
• 09-20-2012, 02:29 PM
Blue ZX3
To me what it sounds like he is asking for is like either a scale factor or offset setting.
• 09-23-2012, 07:52 AM
Grrrmachine
Effectively, yes :D sorry for flooding the thread with useless info.
• 09-29-2012, 12:29 PM
Grrrmachine

As for this...

Quote:

Originally Posted by Sonicxtacy02
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.

it's the mathematical formulae that have me flummoxed; I'm useless at that sort of thing. All I can say is that I'd need a simple box process that matched raw data points to an output value/string, generally on a linear scale. So "data point 0 = 0 bar, data point 1023 = 5 bar", that sort of thing.

My issue with the sliders is that they operate along the whole scale of the raw input data, and that's not what I want. My engine's coolant sensor is non-linear, so I'd like the option to ignore all raw input data below a certain value if possible, and display a value over a certain point. If that's not possible, I'll have to get photoshop out and get creative with the sliders rather than having just a number. That way I can just use multi-image sliders to make my own gauges, as an alternative to custom-calculated values.

Still, good work on all this. There aren't many people who'd keep updating a 4-year-old program :D
Show 40 post(s) from this thread on one page