USB 摄像头适配iPadOS17+
This commit is contained in:
@@ -28,6 +28,8 @@ class HostRealtimeMessageEntity extends Equatable {
|
||||
final double rightMotorRpm; // 实时右电机转速
|
||||
final double roll; // 实时翻滚角度
|
||||
final String controlMode; // 当前控制模式(遥控器拨杆对应)
|
||||
final double linearSpeed; // 实时线速度 m/s(前进为正,后退为负)
|
||||
final double angularSpeed; // 实时角速度 rad/s(左转为正,右转(偏航)为负)
|
||||
|
||||
/// 原始 data 报文,便于后端补字段时兜底
|
||||
final Map<String, dynamic> rawData;
|
||||
@@ -56,6 +58,8 @@ class HostRealtimeMessageEntity extends Equatable {
|
||||
this.rightMotorRpm = 0,
|
||||
this.roll = 0,
|
||||
this.controlMode = '',
|
||||
this.linearSpeed = 0,
|
||||
this.angularSpeed = 0,
|
||||
this.rawData = const {},
|
||||
});
|
||||
|
||||
@@ -85,6 +89,8 @@ class HostRealtimeMessageEntity extends Equatable {
|
||||
rightMotorRpm: _toDouble(data['right_motor_rpm']),
|
||||
roll: _toDouble(data['roll']),
|
||||
controlMode: data['control_mode']?.toString() ?? '',
|
||||
linearSpeed: _toDouble(data['linear_speed']),
|
||||
angularSpeed: _toDouble(data['angular_speed']),
|
||||
rawData: data,
|
||||
);
|
||||
}
|
||||
@@ -128,5 +134,7 @@ class HostRealtimeMessageEntity extends Equatable {
|
||||
rightMotorRpm,
|
||||
roll,
|
||||
controlMode,
|
||||
linearSpeed,
|
||||
angularSpeed,
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user