Skip to main content

plan_settings

Function plan_settings 

Source
pub fn plan_settings(
    cfg: &DeviceConfig,
    settings: &[(String, i64)],
    current: &dyn Fn(u16) -> Option<u32>,
) -> Result<Vec<ParamWrite>, SettingsError>
Expand description

Plans the writes for settings keyed as in the file ({"1": 0, "41[0xf00]": 2}).

current gives a parameter’s current raw value when known; partial parameters are merged into it (or into the other parts’ defaults).