init method
override
Initializes the connection to the device.
Implementation
@override
Future<bool> init() async {
await server.init();
logger.socket = server;
var result = true;
try {
result &= await firmware.init();
result &= await gps.init();
result &= await imu.init();
if (result) {
logger.info("Subsystems initialized");
} else {
logger.warning("The subsystems did not start properly");
}
isReady = true;
return true; // The subsystems should keep running even when something goes wrong.
} catch (error) {
logger.critical("Unexpected error when initializing Subsystems", body: error.toString());
return false;
}
}