init method
- @override
override
Initializes any data needed by this model.
Implementation
@override
Future<void> init() async {
models.messages.stream.onMessage(
name: DriveData().messageName,
constructor: DriveData.fromBuffer,
callback: drive.update,
);
models.messages.stream.onMessage(
name: ScienceData().messageName,
constructor: ScienceData.fromBuffer,
callback: science.update,
);
models.messages.stream.onMessage(
name: RoverPosition().messageName,
constructor: RoverPosition.fromBuffer,
callback: position.update,
);
models.messages.stream.onMessage(
name: ArmData().messageName,
constructor: ArmData.fromBuffer,
callback: arm.update,
);
models.messages.stream.onMessage(
name: GripperData().messageName,
constructor: GripperData.fromBuffer,
callback: gripper.update,
);
drive.addListener(vitals.notify);
// versionTimer = Timer.periodic(versionInterval, _sendVersions);
}