Add gracefull shutdown to sub commands

This commit is contained in:
QuantumEntangledAndy committed 2023-08-07 19:03:06 +07:00
1 parent 0d2f0c3e6f
commit 17e8ab0f37
11 files changed
+37 -6

No files matched your search

-5
View File
@@ -85,8 +85,6 @@ pub struct BcCameraOpt {
pub protocol: ConnectionProtocol,
/// Discovery method to allow
pub discovery: DiscoveryMethods,
/// Printing format for auxilaary data such as battery levels
pub aux_printing: PrintFormat,
/// Credentials for login
pub credentials: Credentials,
}
@@ -343,9 +341,6 @@ impl BcCamera {
abilities: Default::default(),
};
me.keepalive().await?;
if let Err(e) = me.monitor_battery(options.aux_printing).await {
warn!("Could not monitor battery: {:?}", e);
}
Ok(me)
}