Commit Graph

10 Commits (33070abd81504990fbd6a301821dfa8ca673931f)

Author SHA1 Message Date
Egor Savkin 33070abd81 Make commands more consistent
Signed-off-by: Egor Savkin <es@m-labs.hk>
2023-01-05 13:04:21 +08:00
Egor Savkin 21fc244eac Fan status via quadratic regression
* statuses: detect slow fan via quadratic regression and halts (hard stops) with constant threshold
* remove unsafe channels' copy and make FanCtrl own the channels
* scale fan values so that they would fit 0.05-1.0 PWM at all times
* rename fan-restore to fcurve-restore
* style, names and docs adjustments

Signed-off-by: Egor Savkin <es@m-labs.hk>
2023-01-05 11:57:21 +08:00
Egor Savkin 58650d37f1 Refactor and coefficients implemented
Move all the fan logic to the separate file. Add controls for controlling curve.

Signed-off-by: Egor Savkin <es@m-labs.hk>
2022-12-22 17:28:08 +08:00
Egor Savkin 66143d2373 Implemented auto fan control
Signed-off-by: Egor Savkin <es@m-labs.hk>
2022-12-21 14:59:49 +08:00
Egor Savkin 583d06a78b Make fan cmd show the stats
Signed-off-by: Egor Savkin <es@m-labs.hk>
2022-12-20 12:58:00 +08:00
Egor Savkin d117c784d9 Draft hw rev support and fan command
Signed-off-by: Egor Savkin <es@m-labs.hk>
2022-12-19 17:15:33 +08:00
Egor Savkin 4223f7a4ad Draft tacho support
Signed-off-by: Egor Savkin <es@m-labs.hk>
2022-12-15 16:47:52 +08:00
Egor Savkin 30350a3651 Draft support fan pwm settings
Signed-off-by: Egor Savkin <es@m-labs.hk>
2022-12-14 17:25:29 +08:00
topquark12 26ad2f0119 rewrite PID
Rewrite of PID according to https://hackmd.io/IACbwcOTSt6Adj3_F9bKuw PID implementation.

To migrate:
- TEC+/- pin polarity has to be reversed.
- Some saved settings might be wiped upon flashing of new firmware, back up settings before upgrade
- Min / Max integral parameters no longer exist
- kp, ki, kd will likely need to be retuned

The software has been tested on hardware with good temperature control stability.

Reviewed-on: #68
Co-authored-by: topquark12 <aw@m-labs.hk>
Co-committed-by: topquark12 <aw@m-labs.hk>
2022-02-24 20:16:47 +08:00
topquark12 e6a5c31db6 main.rs refactor to reduce length (#60)
Move command handling to command_handler.rs to shorten main.rs

Reviewed-on: #60
Co-authored-by: topquark12 <aw@m-labs.hk>
Co-committed-by: topquark12 <aw@m-labs.hk>
2021-06-07 10:07:05 +08:00