mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +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(
|
||||
bincode::Encode, bincode::Decode, PartialEq, Debug, Default, prefsgenerator::GetterSetter,
|
||||
)]
|
||||
/// UserPrefs defines the set of all the user preference toggles available for Precursor.
|
||||
/// 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 {
|
||||
radio_on_on_boot: bool,
|
||||
connect_known_networks_on_boot: bool,
|
||||
|
|
@ -94,11 +96,4 @@ impl Default for Manager {
|
|||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
mod test {
|
||||
#[test]
|
||||
fn describe() {
|
||||
use crate::Manager;
|
||||
let _m = Manager::new();
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue