Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{icm20689, leak, led, pca9685}: Move from 30 to 60ms to wait pin configuration #91

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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