Skip to content

Commit a9fdd27

Browse files
authored
RSDK-8812: Add frame_rate to flutter sdk (viamrobotics#261)
* changes to flutter sdk * final flutter changes * formatting * remove assignments * remove all tests * added one test
1 parent af89f35 commit a9fdd27

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

lib/src/components/camera/service.dart

+1-4
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,7 @@ class CameraService extends CameraServiceBase {
5151
Future<GetPropertiesResponse> getProperties(ServiceCall call, GetPropertiesRequest request) async {
5252
final camera = _fromManager(request.name);
5353
final properties = await camera.properties();
54-
return GetPropertiesResponse()
55-
..supportsPcd = properties.supportsPcd
56-
..intrinsicParameters = properties.intrinsicParameters
57-
..distortionParameters = properties.distortionParameters;
54+
return properties;
5855
}
5956

6057
@override

test/unit_test/components/camera_test.dart

+3-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ class FakeCamera extends Camera {
4343
return CameraProperties()
4444
..supportsPcd = true
4545
..intrinsicParameters = (IntrinsicParameters()..widthPx = 10)
46-
..distortionParameters = (DistortionParameters()..model = 'test');
46+
..distortionParameters = (DistortionParameters()..model = 'test')
47+
..frameRate = 10.0;
4748
}
4849
}
4950

@@ -80,6 +81,7 @@ void main() {
8081
final actual = await camera.properties();
8182
expect(actual.distortionParameters.model, 'test');
8283
expect(actual.intrinsicParameters.widthPx, 10);
84+
expect(actual.frameRate, 10.0);
8385
});
8486

8587
test('doCommand', () async {

0 commit comments

Comments
 (0)