deeper stack support and state refactoring

This commit is contained in:
2025-07-18 20:31:23 +01:00
parent d3fcb507a0
commit 86b4b227bf
2 changed files with 121 additions and 148 deletions

View File

@@ -87,8 +87,6 @@ pub enum SegmentState {
Minus,
Prompt(bool),
Dot,
O,
P,
Off,
}
@@ -181,21 +179,6 @@ impl SegmentState {
seg.set_dp()
}
}
SegmentState::O => {
seg.set_a();
seg.set_b();
seg.set_c();
seg.set_d();
seg.set_e();
seg.set_f();
}
SegmentState::P => {
seg.set_a();
seg.set_b();
seg.set_g();
seg.set_e();
seg.set_f();
}
SegmentState::Off => (),
}
}
@@ -271,20 +254,6 @@ impl DispalyState {
SegmentState::Off,
])
}
pub fn operation(&mut self) {
self.set([
SegmentState::Off,
SegmentState::Off,
SegmentState::Off,
SegmentState::Off,
SegmentState::O,
SegmentState::P,
SegmentState::Off,
SegmentState::Off,
SegmentState::Off,
])
}
}
// Show data on segment display