Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
7 changed files
with
85 additions
and
1 deletion.
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 @@ | ||
// | ||
// HSStreamDeckDevicePedal.h | ||
// streamdeck | ||
// | ||
// Created by Chris Hocking on 02/03/2023. | ||
// Copyright © 2023 Hammerspoon. All rights reserved. | ||
// | ||
|
||
#import "HSStreamDeckDevice.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface HSStreamDeckDevicePedal : 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 @@ | ||
// | ||
// HSStreamDeckDevicePedal.m | ||
// streamdeck | ||
// | ||
// Created by Chris Hocking on 02/03/2023. | ||
// Copyright © 2023 Hammerspoon. All rights reserved. | ||
// | ||
|
||
#import "HSStreamDeckDevicePedal.h" | ||
|
||
@implementation HSStreamDeckDevicePedal | ||
|
||
- (id)initWithDevice:(IOHIDDeviceRef)device manager:(id)manager { | ||
self = [super initWithDevice:device manager:manager]; | ||
if (self) { | ||
self.deckType = @"Elgato Stream Deck Pedal"; | ||
self.keyRows = 1; | ||
self.keyColumns = 3; | ||
|
||
self.simpleReportLength = 32; | ||
self.reportLength = 1024; | ||
self.reportHeaderLength = 8; | ||
self.dataKeyOffset = 4; | ||
|
||
uint8_t resetHeader[] = {0x03, 0x02}; | ||
self.resetCommand = [NSData dataWithBytes:resetHeader length:2]; | ||
|
||
self.serialNumberCommand = 0x06; | ||
self.firmwareVersionCommand = 0x05; | ||
|
||
self.serialNumberReadOffset = 2; | ||
self.firmwareReadOffset = 6; | ||
} | ||
return self; | ||
} | ||
|
||
- (void)setImage:(NSImage *)image forButton:(int)button { | ||
// Do nothing | ||
} | ||
|
||
- (void)deviceWriteImage:(NSData *)data button:(int)button { | ||
// Do nothing | ||
} | ||
|
||
- (void)setLCDImage:(NSImage *)image forEncoder:(int)encoder { | ||
// Do nothing | ||
} | ||
|
||
@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
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