Skip to content

Commit

Permalink
{icm20689, leak, led, pca9685}: Move from 30 to 60ms to wait pin conf…
Browse files Browse the repository at this point in the history
…iguration

Signed-off-by: Patrick José Pereira <[email protected]>
  • Loading branch information
patrickelectric authored and RaulTrombin committed Nov 28, 2024
1 parent 5b8881a commit e4c605f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/icm20689.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl Icm20689Builder {

let cs_pin = Pin::new(self.cs_pin_number);
cs_pin.export()?;
std::thread::sleep(std::time::Duration::from_millis(30));
std::thread::sleep(std::time::Duration::from_millis(60));
cs_pin.set_direction(Direction::Out)?;
cs_pin.set_value(1)?;

Expand Down
2 changes: 1 addition & 1 deletion src/leak.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl LeakBuilder {
pub fn build(self) -> Result<LeakDetector, Box<dyn Error>> {
let pin = Pin::new(self.pin_number);
pin.export()?;
sleep(Duration::from_millis(30));
sleep(Duration::from_millis(60));
pin.set_direction(Direction::In)?;
Ok(LeakDetector {
pin,
Expand Down
2 changes: 1 addition & 1 deletion src/led.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl LedControllerBuilder {
for &pin_number in &self.pins {
let pin = Pin::new(pin_number);
pin.export().expect("Failed to export LED pin");
sleep(Duration::from_millis(30));
sleep(Duration::from_millis(60));
pin.set_direction(Direction::Out)
.expect("Failed to set direction");
pin.set_value(1).expect("Failed to set initial LED value");
Expand Down
2 changes: 1 addition & 1 deletion src/pca9685.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl Pca9685DeviceBuilder {
let oe_pin = {
let pin = Pin::new(self.oe_pin_number);
pin.export()?;
sleep(Duration::from_millis(30));
sleep(Duration::from_millis(60));
pin.set_direction(Direction::High)?;
pin
};
Expand Down

0 comments on commit e4c605f

Please sign in to comment.