Announcement

Collapse
No announcement yet.

Phidgets app ?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Phidgets app ?

    Hi Clockwork How can I change the phidgets name for the sensors instead of analogue in_00, I could put comp volts, comp temp, comp humidity, left front, ect. Great work by the way on this addin Thanks SNO

  • #2
    Originally posted by SNOtwistR View Post
    Hi Clockwork How can I change the phidgets name for the sensors instead of analogue in_00, I could put comp volts, comp temp, comp humidity, left front, ect. Great work by the way on this addin Thanks SNO
    This has been on my mind. The ability to name the inputs (and outputs) would be nice. I can probably add support for this. I was trying to keep the Config window simple, so it didn't need the OSK. And I was just happy enough that the Phidgets worked. But I realize that the ability to name the sensors is pretty much essential. Either this week's version or the next one should address this.

    Comment


    • #3
      Nice! take your time, and you will have a great front-end. Thanks SNO

      Comment


      • #4
        If I wanted to change the layout of the phidgets skin to add some graphics. Which files would I need to edit/locations? My thinking is gauge type graphics to display the volts, amps, ect. And you have enough on your plate getting v5 out. SNO

        Comment


        • #5
          DriveLine has a built-in function for drawing simple gauges. An example of it's use is the speedometer on the home screen. (I assume you know that clicking on the Logo area of the home screen shows a speedometer-widget-gauge-thing). Look in file Skin_Frame_Main.xml, there's an object named ImageMainGauge. It has a Paint event that looks like this:

          Code:
          PaintGauge ImageMainGaugeSpeed 0 140 10 -130 130 %speedexact%
          ImageMainGaugeSpeed is the name of the object being drawn on.
          0 is the min value
          140 is the max value
          10 is the increment for the labels on the gauge.
          -130 is the starting angle of the gauge.
          130 is the ending angle of the gauge.
          %speedexact% is the value of the gauge. In this case, you'd want to use %phidget_AnalogInFmt00% or %phidget_AnalogInFmt01%, or whichever corresponds to your sensor.

          The colors of the gauge come from the properties of the image object being drawn on.


          For a real easy start (if you don't mind temporarily breaking the speedometer), instead of trying to create a new window or frame, just modify the code that's drawing the speedometer. This is a quick and dirty way to see how it works.

          Step 1:
          In Skin_SkinEvents.XML, under APPEVENT_PHIDGETINPUTCHANGED, add this:
          InvalidateObject ImageMainGaugeSpeed
          That will tell it that the speedometer object needs to be repainted every time the phidgets change.

          Step 2:
          In the Skin_Frame_Main.xml file, under the object mentioned earlier, change %speedexact% to the phidget variable you want to monitor, and change the other values accordingly. You probably don't want to mess with the angles at first. Just the min, max, increment, and variable.


          When you get that working the way you want it to, then try making a new frame and adding multiple gauges.

          Comment


          • #6
            Thanks now I have a project to play with SNO

            Comment


            • #7
              What size is the workable area in the phidgets window, like whatever DL uses for space on the top and bottom and if any on the sides? whats left over to use for actual phidget data and names area. SNO

              Comment


              • #8
                The Skins in DriveLine allow for absolute values as well as percentage values (where the number is a percentage of the parent object's size). All the Default Skin files are written as percentages (so the skins scale to any screen size automatically). If my math is right on this one, the answer is...

                Width = 98% of screen width.

                Height = 68% of the screen height.

                Comment


                • #9
                  Originally posted by ClockWorK View Post
                  DriveLine has a built-in function for drawing simple gauges. An example of it's use is the speedometer on the home screen. (I assume you know that clicking on the Logo area of the home screen shows a speedometer-widget-gauge-thing). Look in file Skin_Frame_Main.xml, there's an object named ImageMainGauge. It has a Paint event that looks like this:

                  Code:
                  PaintGauge ImageMainGaugeSpeed 0 140 10 -130 130 %speedexact%
                  ImageMainGaugeSpeed is the name of the object being drawn on.
                  0 is the min value
                  140 is the max value
                  10 is the increment for the labels on the gauge.
                  -130 is the starting angle of the gauge.
                  130 is the ending angle of the gauge.
                  %speedexact% is the value of the gauge. In this case, you'd want to use %phidget_AnalogInFmt00% or %phidget_AnalogInFmt01%, or whichever corresponds to your sensor.
                  a bit off topic here:
                  is the 140km a hard limit in driveline.
                  I tried to change it to 280 to match my speedometer with an increment of 20. Looks good but does not match my car speed when car starts rolling !!

                  Comment


                  • #10
                    It is not a hard limit at all. I will look at the code.

                    But first, did you change the speed unit from MPH to Km/H in the Settings screen?

                    Comment


                    • #11
                      yes I did. if I keep the 140 value the driveline speedometer is good :-)

                      Comment


                      • #12
                        Is the numeric speed display correct at the bottom-right of the screen? I assume it is. SNO would have let me know if KM/H speed wasn't displaying correctly.

                        It might help if you show me exactly what you changed on that one line in the skin.


                        Once we get this figured out, I will change the skin to check the speed unit and adjust the scale accordingly, so MPH will be 0-140, and KM/H will be 0-280
                        Last edited by ClockWorK; 11-01-2012, 08:45 AM.

                        Comment


                        • #13
                          didn't pay attention. will check and let you know.

                          Comment


                          • #14
                            Also, is your speed coming from GPS or OBD? GPS speed always has a lag of roughly 1 second.

                            Thanks for all the info and reporting!

                            Comment


                            • #15
                              speed coming from GPS.
                              My Ross-Tech VCDS cable does not have a com port (it does not show a com port) and cannot be used as an ODB device.

                              Comment

                              Working...
                              X