Skip to main content
Associate
May 23, 2024
Solved

Motor Pilot RegDesc cannot input float data

I added a custom REG in Motor Pilot and edited the MC_FOC_SDK.qml file, which allows usage, but I can only input integers, not floating-point data. Here is the configuration information.

 

RegListSTMV2.json
 {
    "Id" : 162,
    "Name" : "OVER_BUS_CURRENT",
    "Description" : "max bus current",
    "Type" : "F32",
    "Unit" : "A",
    "Scope": "Motor",
    "Access" : "RW",
    "UpdateFrequency": "MediumFreq"
}
MC_FOC_SDK.qml
McRegGroupSpinBox {
    RegDesc {
            regName: "OVER_BUS_CURRENT"
            decimals:1
            label: "max ibus"
           from: 0
           to: 500
          stepSize: 1
         tooltip:"(0-500)"
    }
}
honkerhz_0-1716439248602.png

 

    This topic has been closed for replies.
    LHOUEBest answer
    ST Employee
    May 23, 2024

    Hello honkerz,

    RegDesc is supporting integer only

    You can use McRegSpinBoxFloat for float value

    BRs 

    If you agree with my answer, please accept it by clicking on 'Accept as solution'.

    1 reply

    LHOUEBest answer
    ST Employee
    May 23, 2024

    Hello honkerz,

    RegDesc is supporting integer only

    You can use McRegSpinBoxFloat for float value

    BRs 

    If you agree with my answer, please accept it by clicking on 'Accept as solution'.