summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/controller/device_status.cpp
blob: f8ed77354a0ab09c1c619c27cb135e889f3ad7ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* SPDX-License-Identifier: BSD-2-Clause */
/*
 * Copyright (C) 2021, Raspberry Pi (Trading) Limited
 *
 * device_status.cpp - device (image sensor) status
 */
#include "device_status.h"

using namespace libcamera; /* for the Duration operator<< overload */

std::ostream &operator<<(std::ostream &out, const DeviceStatus &d)
{
	out << "Exposure: " << d.shutterSpeed
	    << " Frame length: " << d.frameLength
	    << " Gain: " << d.analogueGain;

	if (d.aperture)
		out << " Aperture: " << *d.aperture;

	if (d.lensPosition)
		out << " Lens: " << *d.lensPosition;

	if (d.flashIntensity)
		out << " Flash: " << *d.flashIntensity;

	if (d.sensorTemperature)
		out << " Temperature: " << *d.sensorTemperature;

	return out;
}