Skip to content

Commit

Permalink
Remove vestigal code
Browse files Browse the repository at this point in the history
  • Loading branch information
molenick committed Aug 1, 2023
1 parent 6572031 commit 199b7db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
4 changes: 0 additions & 4 deletions katniss-test/src/bin/spaceship-gui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,10 @@ fn set_jumpdrive_temperature(status: Arc<Mutex<JumpDriveStatus>>, new_temp: i32)

async fn gui_tick(weak_window: Weak<MainWindow>, status: Arc<Mutex<JumpDriveStatus>>) {
loop {
let mode: i32 = status.lock().unwrap().mode.clone();
let powered_time_secs = status.lock().unwrap().powered_time_secs.clone();
let temperature = status.lock().unwrap().temperature.clone();
weak_window
.upgrade_in_event_loop(move |window| {
window.set_powered_time_secs(powered_time_secs);
window.set_temperature(temperature);
window.set_mode(mode);
})
.unwrap();
}
Expand Down
10 changes: 2 additions & 8 deletions katniss-test/src/bin/ui/main.slint
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ import { VerticalVolume } from "vertical_volume.slint";
export component MainWindow inherits Window {
width: 1080px;
height: 960px;
callback power_clicked;
callback temperature_changed(float);

in property <int> mode;
in property <int> powered_time_secs;
in property <int> temperature;
in property <int> temperature_ceiling;

background: black;

Expand Down Expand Up @@ -39,15 +37,11 @@ export component MainWindow inherits Window {
Rectangle {
background: #444;
VerticalBox {
DebugBox {
powered-time-secs: powered-time-secs;
mode: mode;
}
Slider {
width: 500px;
value: 0;
minimum: 0;
maximum: 1000;
maximum: 1000; // magic

changed(change) => {
root.temperature-changed(change);
Expand Down

0 comments on commit 199b7db

Please sign in to comment.