robojackets_robocup_rtp/
lib.rs

1//!
2//! rtp is a library of the cross platform messages that are sent between the base computer
3//! base station, and robots.
4//!
5
6#![no_std]
7#![deny(missing_docs)]
8
9pub mod control_message;
10pub use control_message::{ControlMessage, ControlMessageBuilder, CONTROL_MESSAGE_SIZE};
11
12pub mod robot_status_message;
13pub use robot_status_message::{RobotStatusMessage, RobotStatusMessageBuilder, ROBOT_STATUS_SIZE};
14
15pub mod imu_test_message;
16
17pub mod kicker_program_message;
18
19pub mod kicker_testing;
20
21pub mod radio_benchmarks;
22
23pub mod control_test_message;
24
25pub mod radio_addresses;
26pub use radio_addresses::BASE_STATION_ADDRESSES;
27pub use radio_addresses::ROBOT_RADIO_ADDRESSES;
28
29/// Constant used to select the blue team
30pub const BLUE_TEAM: usize = 0;
31/// Constant used to select the yellow team
32pub const YELLOW_TEAM: usize = 1;
33
34#[derive(Clone, Copy, Debug, PartialEq, Eq)]
35/// The Team the Robots are on
36pub enum Team {
37    /// Blue Team
38    Blue = 0,
39    /// Yellow Team
40    Yellow = 1,
41}
42
43impl Into<bool> for Team {
44    fn into(self) -> bool {
45        match self {
46            Team::Blue => false,
47            Team::Yellow => true,
48        }
49    }
50}