### Important This does **not** reset the USB Connection! This is a managed reset function that takes device quirks into account. It resets "all" features to their default values, where "all" means a hard-coded list of features that this software touches. Does not reset Output device. If this software doesn't modify a feature, it won't be included in the reset. I don't know where this would bec
(&self)
| 201 | /// I don't know where this would become relevant, |
| 202 | /// but I figured it'd be worth noting down. |
| 203 | pub fn reset(&self) -> Result<(), Box<dyn Error>> { |
| 204 | // yeah the return type might be stupid, I'll fix it soon™️ |
| 205 | let features: Vec<Feature> = features::all_features(); |
| 206 | features.iter().for_each(|feature| { |
| 207 | if feature.id == FeatureId::Output { |
| 208 | return; |
| 209 | } |
| 210 | feature.write_to_device(0.0); |
| 211 | }); |
| 212 | |
| 213 | self.read_state_from_device(); |
| 214 | |
| 215 | Ok(()) |
| 216 | } |
| 217 | |
| 218 | pub fn save_profile(&self, path: PathBuf) -> Result<(), Box<dyn Error>> { |
| 219 | // save the current state of the features to a profile |
no test coverage detected