第二次提交
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import 'dart:typed_data';
|
||||
|
||||
import '../../../../core/protocol/machine_protocol_codec.dart';
|
||||
|
||||
class LawnMoverProtocolModel {
|
||||
final int left;
|
||||
final int right;
|
||||
final int lift;
|
||||
final int mower;
|
||||
final int ignition;
|
||||
final int emergency;
|
||||
|
||||
LawnMoverProtocolModel({
|
||||
required this.left,
|
||||
required this.right,
|
||||
this.lift = 0,
|
||||
this.mower = 0,
|
||||
this.ignition = 0,
|
||||
this.emergency = 0,
|
||||
});
|
||||
|
||||
Uint8List toBytes() => MachineProtocolCodec.encodeRemoteControlPayload(
|
||||
left: left,
|
||||
right: right,
|
||||
lift: lift,
|
||||
mower: mower,
|
||||
ignition: ignition,
|
||||
emergency: emergency,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user