loupedeck icon indicating copy to clipboard operation
loupedeck copied to clipboard

Possible solution for Loupedeck CT V2

Open elementalTIMING opened this issue 1 year ago • 2 comments
trafficstars

Hi,

after playing a bit with your code I found a possible solution for the CT V2 (https://github.com/foxxyz/loupedeck/issues/27). Because I've no published repo for this I put the small changes here in the text.

In device.js change productID to:

class LoupedeckCT extends LoupedeckLive {
	static productId = 0x0007;

The CT is now discovered BUT the grid is not drawn anymore. Originally I did a mistake and and changed the productID in the LoupedeckLive but not in the LoupedeckCT. But after fixing my mistake the grid buttons are not shown or updated anymore.

You also need to modify the id in the displays. Here you can use the same values from the LoupedeckLive, wich seems to work pretty well.

class LoupedeckCT extends LoupedeckLive {
	static productId = 0x0007;
	displays = {
		// values from LoupedeckLive
		center: { id: Buffer.from('\x00M'), width: 360, height: 270, offset: [60, 0] },
		left: { id: Buffer.from('\x00M'), width: 60, height: 270 },
		right: { id: Buffer.from('\x00M'), width: 60, height: 270, offset: [420, 0] },

		// original LoupedeckCT values
		// center: { id: Buffer.from('\x00A'), width: 360, height: 270 }, // "A"
		// left: { id: Buffer.from('\x00L'), width: 60, height: 270 }, // "L"
		// right: { id: Buffer.from('\x00R'), width: 60, height: 270 }, // "R"
		knob: { id: Buffer.from('\x00W'), width: 240, height: 240, endianness: 'be' }, // "W"
	};

You can keep the rest of the code as it is. That's it and all CT function work now. I hope that this will help somebody here.

elementalTIMING avatar Feb 20 '24 11:02 elementalTIMING

This is great, thank you! Looks a lot like the firmware change that has been affecting some of the other devices.

Are you able to submit a PR?

foxxyz avatar Feb 21 '24 20:02 foxxyz

This is great, thank you! Looks a lot like the firmware change that has been affecting some of the other devices.

Are you able to submit a PR?

Unfortunately not. I've never published anything to Git. It's something I need to deal with next summer ;-)

elementalTIMING avatar Feb 21 '24 20:02 elementalTIMING