We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 758b0b8 commit 1ab0126Copy full SHA for 1ab0126
1 file changed
src/fan_controller.rs
@@ -36,6 +36,7 @@ impl FanController {
36
37
pub fn fan_on(&mut self) -> Result<(), Box<dyn std::error::Error>> {
38
debug!("Sending fan on signal [p0: low]");
39
+ // 0xFE = p0 low (fan on), p1-p7 high (inactive, no other peripherals on this board)
40
self.expander
41
.set(0xFE)
42
.map_err(|e| format!("Fan on error: {:?}", e))?;
@@ -45,6 +46,7 @@ impl FanController {
45
46
47
pub fn fan_off(&mut self) -> Result<(), Box<dyn std::error::Error>> {
48
debug!("Sending fan off signal [p0: high]");
49
+ // 0xFF = all pins high (fan off, p1-p7 inactive)
50
51
.set(0xFF)
52
.map_err(|e| format!("Fan off error: {:?}", e))?;
0 commit comments