mirror of
https://github.com/switchbrew/libnx.git
synced 2025-07-04 02:22:15 +02:00
[irs] Name image transfer config variables
This commit is contained in:
parent
e7a4eba71c
commit
794a5a4174
@ -26,22 +26,32 @@ typedef struct {
|
||||
} PACKED irsPackedMomentProcessorConfig;
|
||||
|
||||
typedef struct {
|
||||
u64 unk_x0;
|
||||
u32 unk_x8;
|
||||
u32 unk_xc;
|
||||
u8 unk_x10;
|
||||
//exposure controls the sensor's exposure time in microseconds.
|
||||
u64 exposure;
|
||||
//irLedsMode controls which group of IR leds is enabled. Can be all, group 1, group 2 or none.
|
||||
u32 irLeds;
|
||||
//digitalGain controls the signal's digital gain.
|
||||
u32 digitalGain;
|
||||
//negative inverts the captured image.
|
||||
u8 negative;
|
||||
u8 pad[7];
|
||||
u32 unk_x18;
|
||||
//sensorResolution controls the sensor's resolution.
|
||||
u32 sensorResolution;
|
||||
} irsImageTransferProcessorConfig;
|
||||
|
||||
typedef struct {
|
||||
u64 unk_x0;
|
||||
u8 unk_x8;
|
||||
u8 unk_x9;
|
||||
u8 unk_xa;
|
||||
//exposure controls the sensor's exposure time in microseconds.
|
||||
u64 exposure;
|
||||
//irLedsMode controls which group of IR leds is enabled. Can be all, group 1, group 2 or none.
|
||||
u8 irLeds;
|
||||
//digitalGain controls the signal's digital gain.
|
||||
u8 digitalGain;
|
||||
//negative inverts the captured image.
|
||||
u8 negative;
|
||||
u8 pad[5];
|
||||
u32 unk_constant;//offset 0x10
|
||||
u8 unk_x14;
|
||||
//sensorResolution controls the sensor's resolution.
|
||||
u8 sensorResolution;
|
||||
u8 pad2[3];
|
||||
} irsPackedImageTransferProcessorConfig;
|
||||
|
||||
|
@ -334,12 +334,12 @@ Result irsRunImageTransferProcessor(u32 IrCameraHandle, irsImageTransferProcesso
|
||||
|
||||
memset(&packed_config, 0, sizeof(packed_config));
|
||||
|
||||
packed_config.unk_x0 = config->unk_x0;
|
||||
packed_config.unk_x8 = config->unk_x8;
|
||||
packed_config.unk_x9 = config->unk_xc;
|
||||
packed_config.unk_xa = config->unk_x10;
|
||||
packed_config.exposure = config->exposure;
|
||||
packed_config.irLeds = config->irLeds;
|
||||
packed_config.digitalGain = config->digitalGain;
|
||||
packed_config.negative = config->negative;
|
||||
packed_config.unk_constant = 0xa0003;
|
||||
packed_config.unk_x14 = config->unk_x18;
|
||||
packed_config.sensorResolution = config->sensorResolution;
|
||||
|
||||
rc = appletGetAppletResourceUserId(&AppletResourceUserId);
|
||||
if (R_FAILED(rc))
|
||||
@ -416,8 +416,12 @@ Result irsGetImageTransferProcessorState(u32 IrCameraHandle, void* buffer, size_
|
||||
void irsGetDefaultImageTransferProcessorConfig(irsImageTransferProcessorConfig *config) {
|
||||
memset(config, 0, sizeof(irsImageTransferProcessorConfig));
|
||||
|
||||
config->unk_x0 = 0x493E0;
|
||||
config->unk_xc = 0x8;
|
||||
//Set default exposure 300ms, IR LEDs all ON, 8x digital gain, normal image and resolution 240 x 320.
|
||||
config->exposure = 300000;
|
||||
config->irLeds = 0;
|
||||
config->digitalGain = 8;
|
||||
config->negative = 0;
|
||||
config->sensorResolution = 0;
|
||||
}
|
||||
|
||||
Result irsGetIrCameraHandle(u32 *IrCameraHandle, HidControllerID id) {
|
||||
|
Loading…
Reference in New Issue
Block a user