Default for ShaperSettings
@@ -429,6 +429,7 @@ pub struct OperatorUpdateMessage {
/// being phased out, see shaper settings TODO Remove in Beta 15
pub min_shaper_speed: Option<usize>,
/// settings for the device bandwidth shaper
+ #[serde(default="default_shaper_settings")]
pub shaper_settings: ShaperSettings,
}
@@ -448,6 +449,14 @@ pub struct ShaperSettings {
pub min_speed: usize,
}
+fn default_shaper_settings() -> ShaperSettings {
+ ShaperSettings {
+ max_speed: 1000,
+ min_speed: 50,
+ enabled: true,
+ }
+}
+
/// The message we send to the operator server to checkin, this allows us to customize
/// the operator checkin response to the device based on it's network and any commands
/// the operator may wish to send
