Skip to content

Add backlight control for Litra Beam LX#559

Draft
Copilot wants to merge 4 commits into
mainfrom
copilot/add-backlight-control-functionality
Draft

Add backlight control for Litra Beam LX#559
Copilot wants to merge 4 commits into
mainfrom
copilot/add-backlight-control-functionality

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 4, 2026

Litra Beam LX has a separate RGB backlight that was not controllable through this driver. This adds full support for the backlight independent of the main light.

Driver API

Added six functions to driver.ts:

setBacklightOn(device)
setBacklightOff(device)
toggleBacklight(device)
isBacklightOn(device)
setBacklightBrightnessPercentage(device, percentage)
getBacklightBrightnessPercentage(device)

All functions validate device type and throw if called on non-LX devices.

CLI Commands

  • litra-back-on / litra-back-off / litra-back-toggle
  • litra-back-brightness [percentage] - get or set brightness (0-100)

All support --serial-number for multi-device setups.

HID Protocol

Uses LX-specific command bytes:

  • On/Off: 0x11, 0xff, 0x06, 0x1d, 0x00|0x01
  • State query: 0x11, 0xff, 0x06, 0x11
  • Brightness set: 0x11, 0xff, 0x06, 0x21, percentage
  • Brightness get: 0x11, 0xff, 0x06, 0x12

Usage

import { findDevice, setBacklightOn, setBacklightBrightnessPercentage } from 'litra';

const device = findDevice();
setBacklightOn(device);
setBacklightBrightnessPercentage(device, 75);
Original prompt

The Litra Beam LX device supports backlight control functionality that is not currently implemented in this driver. While the device type (DeviceType.LitraBeamLX) is already supported with power, brightness, and temperature controls, the backlight feature needs to be added.

Issue created by Visual Studio Copilot


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits February 4, 2026 15:02
Co-authored-by: timrogers <116134+timrogers@users.noreply.github.com>
Co-authored-by: timrogers <116134+timrogers@users.noreply.github.com>
Co-authored-by: timrogers <116134+timrogers@users.noreply.github.com>
Copilot AI changed the title [WIP] Add backlight control functionality for Litra Beam LX Add backlight control for Litra Beam LX Feb 4, 2026
Copilot AI requested a review from timrogers February 4, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants