[irs] Comply with coding style

This commit is contained in:
Kostas Missos 2018-03-06 19:51:21 +02:00
parent 794a5a4174
commit 84ef73fce9
2 changed files with 16 additions and 26 deletions

View File

@ -26,32 +26,22 @@ typedef struct {
} PACKED irsPackedMomentProcessorConfig;
typedef struct {
//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;
u64 exposure; ///< IR Sensor exposure time in microseconds.
u32 ir_leds; ///< Controls IR leds. Can be all, group 1, group 2 or none.
u32 digital_gain; ///< IR sensor signal's digital gain.
u8 negative; ///< Inverts the captured image.
u8 pad[7];
//sensorResolution controls the sensor's resolution.
u32 sensorResolution;
u32 sensor_res; ///< IR Sensor resolution.
} irsImageTransferProcessorConfig;
typedef struct {
//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;
u64 exposure; ///< IR Sensor exposure time in microseconds.
u8 ir_leds; ///< Controls IR leds. Can be all, group 1, group 2 or none.
u8 digital_gain; ///< IR sensor signal's digital gain.
u8 negative; ///< Inverts the captured image.
u8 pad[5];
u32 unk_constant;//offset 0x10
//sensorResolution controls the sensor's resolution.
u8 sensorResolution;
u8 sensor_res; ///< IR Sensor resolution.
u8 pad2[3];
} irsPackedImageTransferProcessorConfig;

View File

@ -335,11 +335,11 @@ Result irsRunImageTransferProcessor(u32 IrCameraHandle, irsImageTransferProcesso
memset(&packed_config, 0, sizeof(packed_config));
packed_config.exposure = config->exposure;
packed_config.irLeds = config->irLeds;
packed_config.digitalGain = config->digitalGain;
packed_config.ir_leds = config->ir_leds;
packed_config.digital_gain = config->digital_gain;
packed_config.negative = config->negative;
packed_config.unk_constant = 0xa0003;
packed_config.sensorResolution = config->sensorResolution;
packed_config.sensor_res = config->sensor_res;
rc = appletGetAppletResourceUserId(&AppletResourceUserId);
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.
config->exposure = 300000;
config->irLeds = 0;
config->digitalGain = 8;
config->ir_leds = 0;
config->digital_gain = 8;
config->negative = 0;
config->sensorResolution = 0;
config->sensor_res = 0;
}
Result irsGetIrCameraHandle(u32 *IrCameraHandle, HidControllerID id) {