# QGC Light Control

**URL:** https://discuss.bluerobotics.com/t/qgc-light-control/14642
**Category:** QGroundControl
**Created:** [July 6, 2023, 9:57am UTC](https://discuss.bluerobotics.com/t/qgc-light-control/14642 "2023-07-06T09:57:32Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![saris](https://avatars.discourse-cdn.com/v4/letter/s/f04885/32.png) [@saris](https://discuss.bluerobotics.com/u/saris)
#### Post date: [July 6, 2023, 9:57am UTC](https://discuss.bluerobotics.com/t/qgc-light-control/14642/1 "2023-07-06T09:57:32Z")

</div>

Hello.

I would like to modify the QGC distributed as QT5.

I want to add a lantern on button to QGC, and I want to know the function that fits it.

I set the light on ch9 and connected the pin to ch9.

```
mavlink_msg_rc_channels_override_pack_chan(
    static_cast<uint8_t>(_mavlink->getSystemId()),
    static_cast<uint8_t>(_mavlink->getComponentId()),
    sharedLink->mavlinkChannel(),
    &message,
    static_cast<uint8_t>(_id),
    0,
    65535 , // ch1
    65535 , // ch2
    65535 , // ch3
    65535, // ch4
    65535, // ch5
    65535, // ch6
    65535, // ch7
    65535, // ch8
    var, // ch9
    65535, // ch10
    65535, // ch11
    65535, // ch12
    65535, // ch13
    65535, // ch14
    65535, // ch15
    65535, // ch16
    65535, // ch17
    65535 // ch18
    );
sendMessageOnLinkThreadSafe(sharedLink.get(), message);

```

When the above code is transmitted, the light comes on for only 0.1 seconds.  
I always want the light to come on when I turn on the button.

I would appreciate it if you could tell me the function that keeps it on.
