cancel
Showing results for 
Search instead for 
Did you mean: 

Motor Pilot RegDesc cannot input float data

honkerhz
Associate II

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
LHOUE
ST Employee

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'.

View solution in original post

1 REPLY 1
LHOUE
ST Employee

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'.