Commit Graph

140 Commits

Author SHA1 Message Date
9fce19a418 Revert "Disable feedback current readout on flawed HW Revs"
This reverts commit ae3d8b51d4.
2024-05-02 14:38:40 +08:00
ae3d8b51d4 Disable feedback current readout on flawed HW Revs
Thermostats v2.2 and below have a noisy and offset feedback current
`tec_i` caused by missing hardware on 2 MAX1968 TEC driver pins:

1. A missing RC filter on the ITEC pin that would have isolated CPU
sampling pulses from the signal; and
2. Some missing buffering on the VREF pin that would have avoided
loading the VREF signal, preventing voltage drops from the nominal 1.5V.

Since the resulting signal `tec_i` derived from these two signals can
have an error of around +/- 100mA, and readback may affect the stability
performance of the Thermostat, disable current readback entirely on
affected hardware revisions for now.

See https://github.com/sinara-hw/Thermostat/issues/117 and
https://github.com/sinara-hw/Thermostat/issues/120.

On hardware revisions v3.x and above, this would be fixed.
2024-01-31 12:12:22 +08:00
03b4561142 Refactor current_abs_max_tec_i to use uom 2024-01-30 11:41:52 +08:00
76b95f66e0 Use latest working stable rust 2024-01-17 15:29:41 +08:00
8008870bc1 Switch panic_handler to panic_halt
Move away from panic_abort as it uses intrinsics, which is nightly only.
2024-01-17 15:29:15 +08:00
6f81a63d12 Remove unused LED parameters 2023-09-20 15:51:37 +08:00
6f0acc73b8 Update LED L3 for PID status on every cycle
Check if PID is engaged on any channel every cycle, and match the status
with LED L3.
2023-08-10 16:43:19 +08:00
570c0324b3 implement support for fan PWM
Co-authored-by: Egor Savkin <es@m-labs.hk>
Co-committed-by: Egor Savkin <es@m-labs.hk>
2023-03-22 17:15:49 +08:00
1b2f2f3888 update code to use stm32f4xx-hal 0.10.1 API 2022-03-02 17:21:17 +08:00
e6a5c31db6 main.rs refactor to reduce length (#60)
Move command handling to command_handler.rs to shorten main.rs

Reviewed-on: M-Labs/thermostat#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
a5d8661b10 main: fix handling of incomplete data received (#55)
Reviewed-on: M-Labs/thermostat#55
Co-Authored-By: topquark12 <aw@m-labs.hk>
Co-Committed-By: topquark12 <aw@m-labs.hk>
2021-01-29 16:18:07 +08:00
7cb0ed70be Reset all TCP sockets before MCU reset (#53)
Co-Authored-By: topquark12 <aw@m-labs.hk>
Co-Committed-By: topquark12 <aw@m-labs.hk>
2021-01-26 17:45:14 +08:00
16844a1dc1 dac: fix inconsistent current output behavior due to repeated sampling of noisy vref 2021-01-25 13:51:50 +08:00
f6802635a4 add command to reboot into DFU
Co-Authored-By: topquark12 <aw@m-labs.hk>
Co-Committed-By: topquark12 <aw@m-labs.hk>
2021-01-13 11:59:06 +08:00
5c84b7438b Integral rescaling 2021-01-08 11:25:01 +08:00
cc0126636c report save success
save does not hang, it just did not report save success. Closes #33

Reviewed-on: M-Labs/thermostat#44
Co-Authored-By: topquark12 <aw@m-labs.hk>
Co-Committed-By: topquark12 <aw@m-labs.hk>
2021-01-07 18:01:43 +08:00
9852b32646 command_parser, main: implement ShowCommand::Ipv4
Fixes Gitea issue #30
2020-12-20 20:44:10 +01:00
22b0c9fcad main: don't re- set_ipv4_config every tick 2020-12-20 20:43:20 +01:00
b7e6cdbec2 pytec: measure interval 2020-12-16 22:14:21 +01:00
880a887c40 new flash-based ipv4 config with additional mask_len, gateway 2020-12-12 23:44:16 +01:00
383ebcd8e4 rewrite config for sfkv-based flash_store 2020-12-12 01:25:07 +01:00
a943308203 pid: never reset 2020-10-13 23:55:22 +02:00
6ba1459a3c main: send error on invalid command 2020-10-11 23:11:27 +02:00
a332b5fcdc main: fix saving new_ipv4_address 2020-10-11 01:59:39 +02:00
175b88d0e6 s/tecpak/thermostat/g 2020-10-11 01:59:39 +02:00
59103cb2a1 add support for ipv4 address reconfiguration 2020-10-01 01:34:46 +02:00
438da74721 main: remove all plain-text responses 2020-09-30 23:53:13 +02:00
026dd1ed9c main: close tx half of sockets with closed rx half
fixes Gitea issue #9
2020-09-30 23:39:31 +02:00
d4e7036fab session: rename SessionOutput to SessionInput 2020-09-30 23:35:11 +02:00
6e0cf26d6a export postfilter + s-h as json 2020-09-30 22:53:21 +02:00
62d89a68a1 pwm: export summary as json 2020-09-30 22:10:42 +02:00
5521563c91 pid: export summary as json 2020-09-30 20:06:47 +02:00
9e5a58cafd main: switch reports to json serialization 2020-09-27 23:58:03 +02:00
97a09e422b main: add support for disabling postfilters 2020-09-26 01:29:35 +02:00
9f70ef2e0a main: power_down channels before sys_reset 2020-09-25 22:24:43 +02:00
83589610b5 implement reset command 2020-09-25 00:14:29 +02:00
a2caac0fe5 channels: power_down TEC when thermistor is not connected to ADC 2020-09-25 00:01:08 +02:00
20059aff5c channel_state: recognize unplugged thermistor 2020-09-24 23:34:09 +02:00
a1ad9b2456 main: load config from eeprom on boot 2020-09-24 23:08:42 +02:00
8d70c03520 config: finalize load/save 2020-09-24 23:04:29 +02:00
58e648b5e0 pid::Parameters, CenterPoint: demote f32 fields to save config space 2020-09-24 20:47:02 +02:00
d40a038c2f config: switch to postcard encoding 2020-09-24 02:06:53 +02:00
5d0d75d395 config: encode with serde_cbor 2020-09-24 01:18:33 +02:00
93f14523d7 command_parser: parse load/save 2020-09-24 01:17:50 +02:00
201701ee8b implement mac address generation with reading eui48 from i2c eeprom 2020-09-24 00:19:07 +02:00
a84242fb1f implement setting i_set centerpoint 2020-09-23 22:30:04 +02:00
b394cfa3d4 main: remove special handling for PwmPin::ISet 2020-09-23 20:50:50 +02:00
b9902929a9 test: #[allow(unused)] 2020-09-18 01:22:41 +02:00
a4dde1b8ca delint 2020-09-18 00:55:53 +02:00
34543c8660 pid: only reset after target change 2020-09-18 00:24:00 +02:00