1,接收tcp推送消息和和接收tcp推送机器的状态推送消息。
2,集成选择作业列表中的一项接口。
This commit is contained in:
113
lib/features/devices/domain/entities/running_status_entity.dart
Normal file
113
lib/features/devices/domain/entities/running_status_entity.dart
Normal file
@@ -0,0 +1,113 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
class RunningStatusEntity extends Equatable {
|
||||
final double voltage;
|
||||
final double leftTargetSpeed;
|
||||
final double rightTargetSpeed;
|
||||
final double leftMeasureSpeed;
|
||||
final double rightMeasureSpeed;
|
||||
final double leftCurrent;
|
||||
final double rightCurrent;
|
||||
final double leftMotorTemp;
|
||||
final double rightMotorTemp;
|
||||
final double chipTemp;
|
||||
final double yaw;
|
||||
final double pitch;
|
||||
final double roll;
|
||||
final int satelliteCnt;
|
||||
final int qual;
|
||||
final int headingStatus;
|
||||
final double latitude;
|
||||
final double longitude;
|
||||
final String knifeCuttingSpeed;
|
||||
final String controlMode;
|
||||
final String battery;
|
||||
final String workingArea;
|
||||
final String obstacleFlag;
|
||||
|
||||
const RunningStatusEntity({
|
||||
this.voltage = 0.0,
|
||||
this.leftTargetSpeed = 0.0,
|
||||
this.rightTargetSpeed = 0.0,
|
||||
this.leftMeasureSpeed = 0.0,
|
||||
this.rightMeasureSpeed = 0.0,
|
||||
this.leftCurrent = 0.0,
|
||||
this.rightCurrent = 0.0,
|
||||
this.leftMotorTemp = 0.0,
|
||||
this.rightMotorTemp = 0.0,
|
||||
this.chipTemp = 0.0,
|
||||
this.yaw = 0.0,
|
||||
this.pitch = 0.0,
|
||||
this.roll = 0.0,
|
||||
this.satelliteCnt = 0,
|
||||
this.qual = 0,
|
||||
this.headingStatus = 0,
|
||||
this.latitude = 0.0,
|
||||
this.longitude = 0.0,
|
||||
this.knifeCuttingSpeed = "0",
|
||||
this.controlMode = "0",
|
||||
this.battery = "0",
|
||||
this.workingArea = "0",
|
||||
this.obstacleFlag = "0",
|
||||
});
|
||||
|
||||
RunningStatusEntity copyWith({
|
||||
double? voltage,
|
||||
double? leftTargetSpeed,
|
||||
double? rightTargetSpeed,
|
||||
double? leftMeasureSpeed,
|
||||
double? rightMeasureSpeed,
|
||||
double? leftCurrent,
|
||||
double? rightCurrent,
|
||||
double? leftMotorTemp,
|
||||
double? rightMotorTemp,
|
||||
double? chipTemp,
|
||||
double? yaw,
|
||||
double? pitch,
|
||||
double? roll,
|
||||
int? satelliteCnt,
|
||||
int? qual,
|
||||
int? headingStatus,
|
||||
double? latitude,
|
||||
double? longitude,
|
||||
String? knifeCuttingSpeed,
|
||||
String? controlMode,
|
||||
String? battery,
|
||||
String? workingArea,
|
||||
String? obstacleFlag,
|
||||
}) {
|
||||
return RunningStatusEntity(
|
||||
voltage: voltage ?? this.voltage,
|
||||
leftTargetSpeed: leftTargetSpeed ?? this.leftTargetSpeed,
|
||||
rightTargetSpeed: rightTargetSpeed ?? this.rightTargetSpeed,
|
||||
leftMeasureSpeed: leftMeasureSpeed ?? this.leftMeasureSpeed,
|
||||
rightMeasureSpeed: rightMeasureSpeed ?? this.rightMeasureSpeed,
|
||||
leftCurrent: leftCurrent ?? this.leftCurrent,
|
||||
rightCurrent: rightCurrent ?? this.rightCurrent,
|
||||
leftMotorTemp: leftMotorTemp ?? this.leftMotorTemp,
|
||||
rightMotorTemp: rightMotorTemp ?? this.rightMotorTemp,
|
||||
chipTemp: chipTemp ?? this.chipTemp,
|
||||
yaw: yaw ?? this.yaw,
|
||||
pitch: pitch ?? this.pitch,
|
||||
roll: roll ?? this.roll,
|
||||
satelliteCnt: satelliteCnt ?? this.satelliteCnt,
|
||||
qual: qual ?? this.qual,
|
||||
headingStatus: headingStatus ?? this.headingStatus,
|
||||
latitude: latitude ?? this.latitude,
|
||||
longitude: longitude ?? this.longitude,
|
||||
knifeCuttingSpeed: knifeCuttingSpeed ?? this.knifeCuttingSpeed,
|
||||
controlMode: controlMode ?? this.controlMode,
|
||||
battery: battery ?? this.battery,
|
||||
workingArea: workingArea ?? this.workingArea,
|
||||
obstacleFlag: obstacleFlag ?? this.obstacleFlag,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
voltage, leftTargetSpeed, rightTargetSpeed, leftMeasureSpeed, rightMeasureSpeed,
|
||||
leftCurrent, rightCurrent, leftMotorTemp, rightMotorTemp, chipTemp,
|
||||
yaw, pitch, roll, satelliteCnt, qual, headingStatus,
|
||||
latitude, longitude, knifeCuttingSpeed, controlMode, battery, workingArea, obstacleFlag,
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user