mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-02-18 17:23:52 +08:00
* set cuatro fan settings * set cuatro to use pure pwm * use pwm on all boards * remove fan max rpm configs, use pure pwm * add comment about cooldown * change max rpm in python side * remove reference to max_fan_pwm in fan.h * fully refactor fan configs into "has_fan" * increase limits on fan test to 15% either way * only tres for now * doesn't matter * not relevant anymore --------- Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
17 lines
321 B
C
17 lines
321 B
C
#pragma once
|
|
|
|
struct fan_state_t {
|
|
uint16_t tach_counter;
|
|
uint16_t rpm;
|
|
uint8_t power;
|
|
float error_integral;
|
|
uint8_t cooldown_counter;
|
|
};
|
|
extern struct fan_state_t fan_state;
|
|
|
|
void fan_set_power(uint8_t percentage);
|
|
void llfan_init(void);
|
|
void fan_init(void);
|
|
// Call this at FAN_TICK_FREQ
|
|
void fan_tick(void);
|