mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-25 07:25:47 +03:00
representing beg buttons, but no data entry yet.
This commit is contained in:
parent
54f4597166
commit
39ff3b1310
@ -682,6 +682,8 @@ impl ControlTrafficSignal {
|
||||
})
|
||||
.collect(),
|
||||
offset_seconds: self.offset.inner_seconds() as usize,
|
||||
// TODO
|
||||
walk_buttons: traffic_signals::WalkButtons::Complicated,
|
||||
observed,
|
||||
audited: self.audit_md.clone(),
|
||||
};
|
||||
|
@ -401,6 +401,7 @@
|
||||
}
|
||||
],
|
||||
"offset_seconds": 0,
|
||||
"walk_buttons": "Complicated",
|
||||
"observed": {
|
||||
"author": "Dustin Carlino",
|
||||
"datetime": "MM/DD/YYYY HH:MM:SS",
|
||||
|
@ -11,6 +11,8 @@ pub struct TrafficSignal {
|
||||
pub phases: Vec<Phase>,
|
||||
// TODO What should this be relative to?
|
||||
pub offset_seconds: usize,
|
||||
/// Describes the pedestrian buttons for this signal.
|
||||
pub walk_buttons: WalkButtons,
|
||||
/// Information about the person mapping the signal.
|
||||
pub observed: Metadata,
|
||||
/// Information about the latest person to verify a previously mapped signal.
|
||||
@ -77,6 +79,33 @@ pub struct Metadata {
|
||||
pub notes: String,
|
||||
}
|
||||
|
||||
/// Describes the type of pedestrian buttons present at the intersection.
|
||||
#[derive(Serialize, Deserialize, Clone, Debug)]
|
||||
pub enum WalkButtons {
|
||||
/// The intersection has no pedestrian buttons at all. The walk sign comes on automatically
|
||||
/// during the vehicle phases or as a dedicated all-walk phase.
|
||||
NoButtons,
|
||||
/// Buttons are present, but the walk sign comes on automatically regardless of pushing the
|
||||
/// buttons. Additional ADA sounds may happen when pressing the button. Pressing the button
|
||||
/// does not alter how quickly phases change.
|
||||
Optional,
|
||||
/// Buttons are present, but the walk sign comes on automatically regardless of pushing the
|
||||
/// buttons. Pressing the button reliably causes the walk sign to appear faster than if not
|
||||
/// pressed.
|
||||
OptionalButNice,
|
||||
/// Buttons are present and required. If nobody presses the button, no walk sign appears. After
|
||||
/// pressing the button, the signal continues to cycle through phases at the same speed as it
|
||||
/// would without pressing the button.
|
||||
SlowBeg,
|
||||
/// Buttons are present and required. If nobody presses the button, no walk sign appears. After
|
||||
/// pressing the button, the signal reliably gives a walk sign within 15 seconds of pressing
|
||||
/// the button.
|
||||
FastBeg,
|
||||
/// Some other situation not covered by the above. For example, the intersection might have
|
||||
/// buttons only for some crosswalks, but not others.
|
||||
Complicated,
|
||||
}
|
||||
|
||||
static DATA: include_dir::Dir = include_dir::include_dir!("src/data");
|
||||
|
||||
/// Returns all traffic signal data compiled into this build, keyed by OSM node ID.
|
||||
|
Loading…
Reference in New Issue
Block a user