Skip to content

Commit

Permalink
Merge pull request #20 from WGuLL/fixedUpdateRate
Browse files Browse the repository at this point in the history
Fixed the period rate to 1 second.
  • Loading branch information
WGuLL authored Dec 20, 2023
2 parents 6d92843 + a774522 commit 720cf74
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions serial_term/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use crate::egui::Color32;
use crate::egui::RichText;
use eframe::egui;
use std::string::String;
use std::time::Duration;

#[derive(Default)]
struct SerialAppCore {
Expand Down Expand Up @@ -76,6 +77,8 @@ impl eframe::App for SerialAppCore {
.unwrap()
.as_mut()
.read_to_string(&mut self.text_buffer);

ctx.request_repaint_after(Duration::from_secs(1));
});
}
}
Expand Down

0 comments on commit 720cf74

Please sign in to comment.