mirror of
https://github.com/switchbrew/libnx.git
synced 2025-07-04 10:32:15 +02:00
[irs] Comply with coding style
This commit is contained in:
parent
794a5a4174
commit
84ef73fce9
@ -26,32 +26,22 @@ typedef struct {
|
|||||||
} PACKED irsPackedMomentProcessorConfig;
|
} PACKED irsPackedMomentProcessorConfig;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
//exposure controls the sensor's exposure time in microseconds.
|
u64 exposure; ///< IR Sensor exposure time in microseconds.
|
||||||
u64 exposure;
|
u32 ir_leds; ///< Controls IR leds. Can be all, group 1, group 2 or none.
|
||||||
//irLedsMode controls which group of IR leds is enabled. Can be all, group 1, group 2 or none.
|
u32 digital_gain; ///< IR sensor signal's digital gain.
|
||||||
u32 irLeds;
|
u8 negative; ///< Inverts the captured image.
|
||||||
//digitalGain controls the signal's digital gain.
|
|
||||||
u32 digitalGain;
|
|
||||||
//negative inverts the captured image.
|
|
||||||
u8 negative;
|
|
||||||
u8 pad[7];
|
u8 pad[7];
|
||||||
//sensorResolution controls the sensor's resolution.
|
u32 sensor_res; ///< IR Sensor resolution.
|
||||||
u32 sensorResolution;
|
|
||||||
} irsImageTransferProcessorConfig;
|
} irsImageTransferProcessorConfig;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
//exposure controls the sensor's exposure time in microseconds.
|
u64 exposure; ///< IR Sensor exposure time in microseconds.
|
||||||
u64 exposure;
|
u8 ir_leds; ///< Controls IR leds. Can be all, group 1, group 2 or none.
|
||||||
//irLedsMode controls which group of IR leds is enabled. Can be all, group 1, group 2 or none.
|
u8 digital_gain; ///< IR sensor signal's digital gain.
|
||||||
u8 irLeds;
|
u8 negative; ///< Inverts the captured image.
|
||||||
//digitalGain controls the signal's digital gain.
|
|
||||||
u8 digitalGain;
|
|
||||||
//negative inverts the captured image.
|
|
||||||
u8 negative;
|
|
||||||
u8 pad[5];
|
u8 pad[5];
|
||||||
u32 unk_constant;//offset 0x10
|
u32 unk_constant;//offset 0x10
|
||||||
//sensorResolution controls the sensor's resolution.
|
u8 sensor_res; ///< IR Sensor resolution.
|
||||||
u8 sensorResolution;
|
|
||||||
u8 pad2[3];
|
u8 pad2[3];
|
||||||
} irsPackedImageTransferProcessorConfig;
|
} irsPackedImageTransferProcessorConfig;
|
||||||
|
|
||||||
|
@ -335,11 +335,11 @@ Result irsRunImageTransferProcessor(u32 IrCameraHandle, irsImageTransferProcesso
|
|||||||
memset(&packed_config, 0, sizeof(packed_config));
|
memset(&packed_config, 0, sizeof(packed_config));
|
||||||
|
|
||||||
packed_config.exposure = config->exposure;
|
packed_config.exposure = config->exposure;
|
||||||
packed_config.irLeds = config->irLeds;
|
packed_config.ir_leds = config->ir_leds;
|
||||||
packed_config.digitalGain = config->digitalGain;
|
packed_config.digital_gain = config->digital_gain;
|
||||||
packed_config.negative = config->negative;
|
packed_config.negative = config->negative;
|
||||||
packed_config.unk_constant = 0xa0003;
|
packed_config.unk_constant = 0xa0003;
|
||||||
packed_config.sensorResolution = config->sensorResolution;
|
packed_config.sensor_res = config->sensor_res;
|
||||||
|
|
||||||
rc = appletGetAppletResourceUserId(&AppletResourceUserId);
|
rc = appletGetAppletResourceUserId(&AppletResourceUserId);
|
||||||
if (R_FAILED(rc))
|
if (R_FAILED(rc))
|
||||||
@ -418,10 +418,10 @@ void irsGetDefaultImageTransferProcessorConfig(irsImageTransferProcessorConfig *
|
|||||||
|
|
||||||
//Set default exposure 300ms, IR LEDs all ON, 8x digital gain, normal image and resolution 240 x 320.
|
//Set default exposure 300ms, IR LEDs all ON, 8x digital gain, normal image and resolution 240 x 320.
|
||||||
config->exposure = 300000;
|
config->exposure = 300000;
|
||||||
config->irLeds = 0;
|
config->ir_leds = 0;
|
||||||
config->digitalGain = 8;
|
config->digital_gain = 8;
|
||||||
config->negative = 0;
|
config->negative = 0;
|
||||||
config->sensorResolution = 0;
|
config->sensor_res = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Result irsGetIrCameraHandle(u32 *IrCameraHandle, HidControllerID id) {
|
Result irsGetIrCameraHandle(u32 *IrCameraHandle, HidControllerID id) {
|
||||||
|
Loading…
Reference in New Issue
Block a user