-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* introduce team.toml * Require HULKs-OS 7.5.7 * update lock files * update documentation * adjust structs for hostnames * parse toml not json * renaming
- Loading branch information
Showing
14 changed files
with
408 additions
and
248 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,32 @@ | ||
use lazy_static::lazy_static; | ||
use serde::{Deserialize, Serialize}; | ||
use std::collections::HashMap; | ||
|
||
#[derive(Debug, Serialize, Deserialize)] | ||
pub struct HardwareId { | ||
pub body_id: String, | ||
pub head_id: String, | ||
} | ||
|
||
pub const HULA_DBUS_INTERFACE: &str = "org.hulks.hula"; | ||
pub const HULA_DBUS_PATH: &str = "/org/hulks/HuLA"; | ||
pub const HULA_DBUS_SERVICE: &str = "org.hulks.hula"; | ||
pub const HULA_SOCKET_PATH: &str = "/tmp/hula"; | ||
pub const OS_IS_NOT_LINUX: bool = !cfg!(target_os = "linux"); | ||
pub const OS_RELEASE_PATH: &str = "/etc/os-release"; | ||
pub const OS_VERSION: &str = "7.5.6"; | ||
pub const OS_VERSION: &str = "7.5.7"; | ||
pub const SDK_VERSION: &str = "7.5.0"; | ||
|
||
#[derive(Serialize, Deserialize)] | ||
pub struct Team { | ||
pub team_number: u8, | ||
pub naos: Vec<Nao>, | ||
} | ||
|
||
#[derive(Serialize, Deserialize)] | ||
pub struct Nao { | ||
pub number: u8, | ||
pub hostname: String, | ||
pub body_id: String, | ||
pub head_id: String, | ||
} | ||
|
||
lazy_static! { | ||
pub static ref HARDWARE_IDS: HashMap<u8, HardwareId> = { | ||
let content = include_str!("../../../etc/parameters/hardware_ids.json"); | ||
serde_json::from_str(content).unwrap() | ||
pub static ref TEAM: Team = { | ||
let content = include_str!("../../../etc/parameters/team.toml"); | ||
toml::from_str(content).unwrap() | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.