sparser data transfers

This commit is contained in:
vcoppe committed 2026-10-18 16:20:32 +02:00
1 parent 4583874e7e
commit a07da16163
15 files changed
+22 -24

No files matched your search

+3
View File
@@ -527,6 +527,9 @@ impl TrackpointDetails {
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
pub struct SelectionPoint {
/// Slope (%) at the trackpoint.
#[serde(skip_serializing_if = "Option::is_none")]
pub slope: Option<f64>,
/// ms since the epoch.
#[serde(skip_serializing_if = "Option::is_none")]
pub time: Option<f64>,
+1 -1
View File
@@ -153,7 +153,6 @@ buffers!(
total_distance,
elevation_gain,
elevation_loss,
slope,
lng,
lat,
ele
@@ -202,6 +201,7 @@ pub fn selection_point<H: History>(engine: &Engine<H>, index: usize) -> Option<S
let segment = stats.slope_segments.at(index);
let finite = |value: f64| value.is_finite().then_some(value);
Some(SelectionPoint {
slope: finite(stats.slope[index]),
time: stats
.time
.as_ref()