Can't create a prop function for a EV power gauge

Discussion in 'Programming' started by mrkelkel, Jul 2, 2024 at 5:22 PM.

  1. mrkelkel

    mrkelkel
    Expand Collapse

    Joined:
    Aug 18, 2013
    Messages:
    60
    So I'm trying to add an analog EV power gauge with a needle that moves according to the instantaneous power consumption.
    upload_2024-7-2_23-5-58.png
    With the speedometer or fuel gauge, one just specifies "wheelspeed" or "fuel" in the "func" field of the props section. I've been trying to find the correct "func" name for the EV motor power, but putting in the vanilla EV car controller sections hasn't worked:
    Code:
        "controller": [
            ["fileName"],
            ["gauges/genericGauges", {"name":"gauges", }],
            ["gauges/customModules/electricMotorData"],
        ],
        "gauges": {
            "displayData": {
                "customModules": [
                    ["moduleName", "property"]
                    ["electricMotorData", "currentPower"],
                    ["electricMotorData", "remainingRange"],
                    ["electricMotorData", "consumptionGraph"],
                ]
            }
        }
       "props": [
            ["func", "mesh", "idRef:","idX:","idY:", "baseRotation", "rotation", "translation", "min", "max", "offset", "multiplier"],
            //needles
            ["wheelspeed",   "enuo_needle_KMH",    "dshl","dsh2l","dshr",        {"x":0, "y":90, "z":180}, {"x":0, "y":-3.83 , "z":-0}, {"x":0, "y":0, "z":0}, 0, 75, 0, 1.6],
            ["currentPower",     "enuo_needle_KW",    "dshl","dsh2l","dshr",        {"x":0, "y":90, "z":180}, {"x":0, "y":-3.83 , "z":-0}, {"x":0, "y":0, "z":0}, 0, 75, 0, 16],
        ],
    
    So can anyone point me in the right direction? Thanks!
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice