We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1530d9c + 6e46f80 commit 1480dcaCopy full SHA for 1480dca
sensors/gc0308.c
@@ -279,7 +279,8 @@ static int set_framesize(sensor_t *sensor, framesize_t framesize)
279
280
static int set_contrast(sensor_t *sensor, int contrast)
281
{
282
- if (contrast != 0) {
+ if (contrast > 0) {
283
+ sensor->status.contrast = contrast;
284
write_reg(sensor->slv_addr, 0xfe, 0x00);
285
write_reg(sensor->slv_addr, 0xb3, contrast);
286
}
@@ -370,7 +371,7 @@ static int init_status(sensor_t *sensor)
370
371
372
373
sensor->status.brightness = 0;
- sensor->status.contrast = 0;
374
+ sensor->status.contrast = 50;
375
sensor->status.saturation = 0;
376
sensor->status.sharpness = 0;
377
sensor->status.denoise = 0;
0 commit comments