Kevin Lee 3 months ago
parent
commit
561205cadd
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/config/pen.rs

+ 2 - 0
src/config/pen.rs

@@ -420,6 +420,7 @@ impl RandomizePen {
                     setting.pulse_width = Some(*width);
                 }
 
+                // Check for duplicates
                 if !generated.contains(&setting) {
                     generated.push(setting);
                     setting.apply(pen);
@@ -432,6 +433,7 @@ impl RandomizePen {
                     debug!("Duplicate random setting");
                 }
 
+                // Fail out if max attempts reached (insufficient search space)
                 if attempt == MAX_ATTEMPTS {
                     panic!(
                         "Exceeded maximum number of {} randommization attempts",