Skip to content

Conversation

@cortex
Copy link
Contributor

@cortex cortex commented Nov 1, 2024

This allows getting hardware name and type from QML

Example code:

import QtQuick 2.7
import QtQuick.Controls 2.0

import Vedder.vesc.vescinterface 1.0

Item {
    function testHw(){
       console.log( VescIf.getHardwareNow());
       console.log( VescIf.getHardwareTypeNow());
    }

    Button{
        text :"Test HW"
        onClicked: testHw()
    }
}

This allows getting hardware name and type from QML
@vedderb
Copy link
Owner

vedderb commented Nov 2, 2024

This should be possible as it is now I think. Can you give this a try?

import QtQuick 2.15
import QtQuick.Controls 2.15

import Vedder.vesc.vescinterface 1.0

Item {
    function testHw(){
       var fw = VescIf.getLastFwRxParams()
       console.log(fw.hw)
       console.log(fw.hwTypeStr())
    }

    Button{
        text :"Test HW"
        onClicked: testHw()
    }
}

@cortex
Copy link
Contributor Author

cortex commented Nov 12, 2024

Those work just fine, didn't realize they existed , thanks @vedderb !

@cortex cortex closed this Nov 12, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Nov 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants