logarithmic graph

This commit is contained in:
2024-12-03 23:06:47 -08:00
parent 1fb3ef02db
commit 07b585f956
16 changed files with 758 additions and 554 deletions

View File

@@ -14,7 +14,7 @@ fn tlm_data_type_serialzier<S>(tlm_data_type: &TelemetryDataType, serializer: S)
struct TlmDataTypeVisitor;
impl<'de> Visitor<'de> for TlmDataTypeVisitor {
impl Visitor<'_> for TlmDataTypeVisitor {
type Value = TelemetryDataType;
fn expecting(&self, formatter: &mut Formatter) -> std::fmt::Result {
@@ -95,7 +95,7 @@ impl TelemetryManagementService {
definition: TelemetryDefinition {
uuid: uuid.clone(),
name: telemetry_definition_request.name.clone(),
data_type: telemetry_definition_request.data_type().clone(),
data_type: telemetry_definition_request.data_type(),
},
data: tokio::sync::watch::channel(None).0
});
@@ -104,11 +104,9 @@ impl TelemetryManagementService {
}
pub async fn get_by_name(&self, name: &String) -> Option<TelemetryData> {
let Some(uuid) = ({
let uuid = {
let uuid_lock = self.uuid_mapping.lock().await;
uuid_lock.get(name).map(|inner| inner.clone())
}) else {
return None;
uuid_lock.get(name).cloned()?
};
self.get_by_uuid(&uuid).await
@@ -116,6 +114,6 @@ impl TelemetryManagementService {
pub async fn get_by_uuid(&self, uuid: &String) -> Option<TelemetryData> {
let tlm_lock = self.tlm_mapping.lock().await;
tlm_lock.get(uuid).map(|inner| inner.clone())
tlm_lock.get(uuid).cloned()
}
}