How can I call the "wind direction" to show on the screen?

Hello everybody,
I want to customize the qground-control screen, and want to read the wind-direction(degree) (in qml file) for show the wind-direction by the picture of Arrow on the screen (compass widget).
I try to read the wind-direction by use this command “vehicle.wind.direction”, but the output is only “zero” all the time.
How can I call the wind-direction in the correct way.
Anyone please help me!
Thank you in advance.

You want vehicle.wind.direction.value. Also not sure where you are getting vehicle from but make sure you really have a vehicle in the property.

Thank you for your advice, I will try in this afternoon.

@DonLakeFlyer , I try to modify source code as your advice, but it still “zero” value, and have no errors.
The property vehicle was defined, and can use normally by property _heading.

Here is the some source code (can’t read wind direction)

property real _heading: vehicle ? vehicle.heading.rawValue : 0
roperty real _windDirection: vehicle ? vehicle.wind.direction.value : 0

Image {
id: windDirection
source: “/res/wind-direction.svg”
visible: true
width: size * 0.5
sourceSize.width: width
fillMode: Image.PreserveAspectFit
anchors.centerIn: parent
transform: Rotation {
origin.x: windDirection.width / 2
origin.y: windDirection.height / 2
angle: _windDirection-90-_heading

Are you have other advices?

Is there actually a value in the property. Add it to the instrument panel to see.