apps: cam: Do not overwrite name when adding camera model
If `addModel` is true, then the previously set `name` will be overwritten.
This does not seem to be the intended behaviour, so fix it by using `+=`.
Before:
Available cameras:
1: 'imx219' (/base/soc@0/bus@30800000/i2c@30a30000/camera@10)
After:
Available cameras:
1: External camera 'imx219' (/base/soc@0/bus@30800000/i2c@30a30000/camera@10)
Fixes: aab49f903e ("cam: Do not assume Location is available")
Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
@@ -337,7 +337,7 @@ std::string CamApp::cameraName(const Camera *camera)
|
||||
*/
|
||||
const auto &model = props.get(properties::Model);
|
||||
if (model)
|
||||
name = "'" + *model + "' ";
|
||||
name += "'" + *model + "' ";
|
||||
}
|
||||
|
||||
name += "(" + camera->id() + ")";
|
||||
|
||||
Reference in New Issue
Block a user