-
Notifications
You must be signed in to change notification settings - Fork 582
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Work in progress. Currently only the regular Stream Deck buttons are working. - Still need to work out how to properly add the touch screen and knobs. - Closes #3342
- Loading branch information
1 parent
6d83452
commit a2c13a3
Showing
6 changed files
with
85 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// HSStreamDeckDevicePlus.h | ||
// streamdeck | ||
// | ||
// Created by Chris Hocking on 16/02/2023. | ||
// Copyright © 2023 Hammerspoon. All rights reserved. | ||
// | ||
|
||
#import "HSStreamDeckDevice.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface HSStreamDeckDevicePlus : HSStreamDeckDevice | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// | ||
// HSStreamDeckDeviceMk2.m | ||
// streamdeck | ||
// | ||
// Created by Chris Hocking on 16/02/2023. | ||
// Copyright © 2023 Hammerspoon. All rights reserved. | ||
// | ||
|
||
#import "HSStreamDeckDevicePlus.h" | ||
|
||
@implementation HSStreamDeckDevicePlus | ||
|
||
- (id)initWithDevice:(IOHIDDeviceRef)device manager:(id)manager { | ||
self = [super initWithDevice:device manager:manager]; | ||
if (self) { | ||
self.deckType = @"Elgato Stream Deck Plus"; | ||
self.keyRows = 2; | ||
self.keyColumns = 4; | ||
self.imageWidth = 120; | ||
self.imageHeight = 120; | ||
self.imageCodec = STREAMDECK_CODEC_JPEG; | ||
self.imageFlipX = NO; | ||
self.imageFlipY = NO; | ||
self.imageAngle = 0; | ||
self.simpleReportLength = 32; | ||
self.reportLength = 1024; | ||
self.reportHeaderLength = 8; | ||
self.dataKeyOffset = 4; | ||
|
||
uint8_t resetHeader[] = {0x03, 0x02}; | ||
self.resetCommand = [NSData dataWithBytes:resetHeader length:2]; | ||
|
||
uint8_t brightnessHeader[] = {0x03, 0x08, 0xFF}; | ||
self.setBrightnessCommand = [NSData dataWithBytes:brightnessHeader length:3]; | ||
|
||
self.serialNumberCommand = 0x06; | ||
self.firmwareVersionCommand = 0x05; | ||
|
||
self.serialNumberReadOffset = 2; | ||
self.firmwareReadOffset = 6; | ||
} | ||
return self; | ||
} | ||
|
||
- (void)deviceWriteImage:(NSData *)data button:(int)button { | ||
[self deviceV2WriteImage:data button:button]; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters