Skip to content

Commit 244f4d6

Browse files
committed
test: Add in api-test-app remaining APIs
1 parent 201734b commit 244f4d6

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

test/api_test_app/apis/deviceDemo.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ DeviceDemo::DeviceDemo()
3333
{
3434
methods_.push_back("Device.chipsetId");
3535
methods_.push_back("Device.deviceClass");
36+
methods_.push_back("Device.hdr");
3637
methods_.push_back("Device.timeInActiveState");
3738
methods_.push_back("Device.uid");
3839
methods_.push_back("Device.uptime");
@@ -59,6 +60,15 @@ void DeviceDemo::runOption(const std::string& method)
5960
<< std::endl;
6061
}
6162
}
63+
else if (method == "Device.hdr")
64+
{
65+
auto r = Firebolt::IFireboltAccessor::Instance().DeviceInterface().hdr();
66+
if (succeed(r))
67+
{
68+
std::cout << "HDR: {" << std::boolalpha << r->hdr10 << ", " << r->hdr10Plus << ", " << r->dolbyVision
69+
<< ", " << r->hlg << "}" << std::endl;
70+
}
71+
}
6272
else if (method == "Device.timeInActiveState")
6373
{
6474
auto r = Firebolt::IFireboltAccessor::Instance().DeviceInterface().timeInActiveState();

test/api_test_app/apis/displayDemo.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,23 @@ using namespace Firebolt::Display;
2828
DisplayDemo::DisplayDemo()
2929
: DemoBase("Display")
3030
{
31+
methods_.push_back("Display.edid");
3132
methods_.push_back("Display.maxResolution");
3233
methods_.push_back("Display.size");
3334
}
3435

3536
void DisplayDemo::runOption(const std::string& method)
3637
{
3738
std::cout << "Running Display method: " << method << std::endl;
38-
if (method == "Display.maxResolution")
39+
if (method == "Display.edid")
40+
{
41+
auto r = Firebolt::IFireboltAccessor::Instance().DisplayInterface().edid();
42+
if (succeed(r))
43+
{
44+
std::cout << "EDID: " << *r << std::endl;
45+
}
46+
}
47+
else if (method == "Display.maxResolution")
3948
{
4049
auto r = Firebolt::IFireboltAccessor::Instance().DisplayInterface().maxResolution();
4150
if (succeed(r))

0 commit comments

Comments
 (0)