LcamDev: Add baked in camera profiles; use new test supports

This commit is contained in:
2026-06-13 18:50:31 -04:00
parent f3ca20ac1d
commit 25d7b9c013
8 changed files with 488 additions and 90 deletions
@@ -0,0 +1,45 @@
#ifndef LCAMERA_DEV_TESTS_CATALOG_HELPERS_H
#define LCAMERA_DEV_TESTS_CATALOG_HELPERS_H
#include <bakedCameraProfiles.h>
#include <cameraIdentity.h>
#include <string>
#include <vector>
namespace lcamera_dev {
namespace tests {
inline CameraIdentityRecord profileToIdentityRecord(
const test_fixtures::BakedCameraProfile& profile)
{
CameraIdentityRecord record;
record.id = profile.libcameraId;
record.model = profile.model;
record.locationLabel = profile.location;
return record;
}
inline std::vector<CameraIdentityRecord> bakedProfilesAsRecords(
const char *machineTag)
{
std::vector<CameraIdentityRecord> records;
for (std::size_t i = 0; i < test_fixtures::bakedCameraProfileCount; ++i)
{
const test_fixtures::BakedCameraProfile& profile =
test_fixtures::bakedCameraProfiles[i];
if (std::string(profile.machineTag) != machineTag) {
continue;
}
records.push_back(profileToIdentityRecord(profile));
}
return records;
}
} // namespace tests
} // namespace lcamera_dev
#endif // LCAMERA_DEV_TESTS_CATALOG_HELPERS_H