mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
document how to add user preferences, general cleanup
This commit is contained in:
parent
db9372d5d0
commit
82c31e760b
1 changed files with 6 additions and 11 deletions
|
|
@ -30,9 +30,11 @@ impl From<DecodeError> for Error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(
|
/// UserPrefs defines the set of all the user preference toggles available for Precursor.
|
||||||
bincode::Encode, bincode::Decode, PartialEq, Debug, Default, prefsgenerator::GetterSetter,
|
/// Setters and getters are PDDB-aware, and are generated by the `prefsgenerator::GetterSetter` macro.
|
||||||
)]
|
/// To add a new preference setting just drop a new struct entry in here.
|
||||||
|
/// The struct field type must be serializable by bincode.
|
||||||
|
#[derive(prefsgenerator::GetterSetter)]
|
||||||
struct UserPrefs {
|
struct UserPrefs {
|
||||||
radio_on_on_boot: bool,
|
radio_on_on_boot: bool,
|
||||||
connect_known_networks_on_boot: bool,
|
connect_known_networks_on_boot: bool,
|
||||||
|
|
@ -95,10 +97,3 @@ impl Default for Manager {
|
||||||
Self::new()
|
Self::new()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mod test {
|
|
||||||
#[test]
|
|
||||||
fn describe() {
|
|
||||||
use crate::Manager;
|
|
||||||
let _m = Manager::new();
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue