Move iteration count ask to beginning of loop
All checks were successful
Basic Cargo Checks / docker-build (push) Successful in 1m25s
Basic Cargo Checks / docker-check (push) Successful in 3m31s

This commit is contained in:
Blizzard Finnegan 2023-06-19 15:09:56 -04:00
parent f1d8af8e3d
commit d522fac9b8
Signed by: blizzardfinnegan
GPG key ID: 61C1E13067E0018E

View file

@ -56,6 +56,16 @@ fn main(){
log::debug!("Debug enabled!");
}
loop{
let mut iteration_count:u64 = 0;
if args.debug {
iteration_count = 10000;
}
else {
while iteration_count < 1{
iteration_count = int_input_filtering(Some("Enter the number of iterations to complete: "));
}
}
let gpio = &mut GpioPins::new();
match std::fs::read_dir("/dev/serial/by-path"){
Ok(available_ttys)=>{
@ -128,16 +138,6 @@ fn main(){
}
}
let mut iteration_count:u64 = 0;
if args.debug {
iteration_count = 10000;
}
else {
while iteration_count < 1{
iteration_count = int_input_filtering(Some("Enter the number of iterations to complete: "));
}
}
let mut iteration_threads = Vec::new();
while let Some(mut device) = devices.pop(){
iteration_threads.push(thread::spawn(move||{