Commit Graph

256 Commits

Author SHA1 Message Date
407c0998af ad7172: set output data rate to 10 Hz 2020-09-28 01:24:32 +02:00
9e5a58cafd main: switch reports to json serialization 2020-09-27 23:58:03 +02:00
aea306cf17 config: save postfilter setting 2020-09-26 01:40:01 +02:00
97a09e422b main: add support for disabling postfilters 2020-09-26 01:29:35 +02:00
61d2cd6ecf channels: init i_set at centerpoint 2020-09-25 22:56:23 +02:00
f3ec96f425 channels: fix doc 2020-09-25 22:55:48 +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
f690599f9e config: update tests 2020-09-24 23:21:54 +02:00
b3e9a1b636 init_log: set USB_LOGGER max level 2020-09-24 23:11:23 +02:00
bfbf037006 config: add load/save code 2020-09-24 23:10:47 +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
3b050347d4 config: add test_encode_decode 2020-09-24 21:35:15 +02:00
254c1c3d73 remove now unneeded uom feature use_serde 2020-09-24 21:33:42 +02:00
5a293a0ada config: convert steinhart_hart::Parameters to SteinhartHartConfig for f32 storage 2020-09-24 21:32:56 +02:00
daa398cb5e config: add pwm limits 2020-09-24 21:10:27 +02:00
17e89b2041 config: add test_fit_eeprom 2020-09-24 20:59:04 +02:00
58e648b5e0 pid::Parameters, CenterPoint: demote f32 fields to save config space 2020-09-24 20:47:02 +02:00
c5c0ce5625 channels: rm debug output 2020-09-24 19:49:11 +02:00
d3606d25b6 fix imports 2020-09-24 15:49:13 +08: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
edc675f5af command_parser: rename a test 2020-09-18 01:16:19 +02:00
a4dde1b8ca delint 2020-09-18 00:55:53 +02:00
7361619a53 pid: update default parameters 2020-09-18 00:41:32 +02:00
34543c8660 pid: only reset after target change 2020-09-18 00:24:00 +02:00
83a209397e fix tests 2020-09-18 00:23:30 +02:00
ba84295ec5 reconnect the pid controller 2020-09-18 00:09:30 +02:00
fb81380955 fix tests
run with `cargo test --target=x86_64-unknown-linux-gnu`
2020-09-17 01:48:27 +02:00
94e0525002 tec_u_meas: subtract vref offset 2020-09-17 01:20:47 +02:00
1157b73f7f max_i_pos/max_i_neg: remove vref from calculation
full duty pwm is at vref already
2020-09-17 01:03:57 +02:00
dd06ae1075 main: improve output 2020-09-16 23:32:48 +02:00
f76ee9a607 separate adc and max vref 2020-09-16 23:31:49 +02:00
fc0ca8b581 calculate i_set current 2020-09-16 22:22:48 +02:00
8c80062da8 use proper units for pwm pins 2020-09-16 22:06:15 +02:00
7d45d5ad32 adc: complete temperature calculation 2020-09-16 20:50:23 +02:00
dda1f2f0b4 use ThermodynamicTemperature 2020-09-16 18:40:07 +02:00
b1b6d1ea94 fixes 2020-09-14 00:12:28 +02:00
b80fcc430b channel_state: move adc_calibration into ChannelState 2020-09-13 23:15:48 +02:00
bb26490153 unit: replace with uom 2020-09-13 23:13:51 +02:00
4a1ce342a0 pins: enable pwm pins 2020-09-12 00:35:58 +02:00
10208e1ac0 main: bump WATCHDOG_INTERVAL to 1s
required for running Channels.calibrate_dac_value()
2020-09-10 23:28:00 +02:00
42587810cd usb: add serial logger 2020-09-10 23:17:31 +02:00
c11b71cc0d adc: don't calibrate but convert using ChannelCalibration 2020-09-09 23:10:33 +02:00
4e6aa5fe0c leds: init 2020-09-06 21:10:10 +02:00
9a912392be channels: fix dac calibration 2020-09-06 19:28:33 +02:00
50dcee0c8a pins: reuse definitions 2020-09-06 19:28:33 +02:00
f76ae453a9 ad5680: cap value to MAX_VALUE 2020-09-06 19:28:33 +02:00
a3df2bc685 update to newer stm32-eth 2020-09-03 21:38:56 +02:00
1711feae84 timer: define sleep() as pub 2020-05-31 19:54:18 +02:00
f9b55508dd ad5680: keep sync high for 1ms 2020-05-28 20:45:42 +02:00
cf03613ac5 main: fix peripheral params 2020-05-28 20:43:52 +02:00
3c94342448 replace tec_u_meas_adc with pins_adc 2020-05-28 02:06:32 +02:00
5418488a2f replace channel[01].adc with pins_adc 2020-05-28 02:01:55 +02:00
ec6aa03dc3 set pwm values as ratio 0..1 2020-05-27 20:38:57 +02:00
35af543e33 channels: fix/optimize calibrate_dac_value() 2020-05-20 23:09:24 +02:00
cca0a77657 keep shdn high all the time 2020-05-20 23:07:03 +02:00
d326517453 channels: remove unneccessary pub qualifiers 2020-05-20 21:27:22 +02:00
e6e150dac3 add Channels::calibrate_dac_value() 2020-05-19 00:15:39 +02:00
70127491f6 add vref_pin 2020-05-18 22:46:09 +02:00
3d6e1f18a6 add tec_u_meas 2020-05-18 21:38:13 +02:00
28a71d34d7 fix tec_i calculation 2020-05-18 21:23:07 +02:00
0bc0af7487 rename dac_loopback to dac_feedback 2020-05-17 02:18:25 +02:00
34c2da4484 ad7172: fix calibration 2020-05-17 02:11:53 +02:00
ba860e52ac control i_set dac in volts 2020-05-17 01:27:47 +02:00
38a220ce4e fix tec_i calculation, add units::{Amps, Ohms} 2020-05-17 00:54:37 +02:00
fb5c7a84e9 add units::Volts, use for stm32f4 adc 2020-05-17 00:13:52 +02:00
7f8dd62a36 add itec_pin 2020-05-16 23:59:31 +02:00
a317eb60fd rename ref_adc to dac_loopback 2020-05-16 19:36:00 +02:00
feae22b277 ad5680: idle low for powersaving 2020-05-16 01:18:14 +02:00
c53c9a289f pins: fix ref_pins 2020-05-16 01:09:38 +02:00
53930497e4 ad5680: fix MAX_VALUE 2020-05-13 23:19:20 +02:00
9ecf705420 ad5680: fix SPI_MODE 2020-05-13 23:19:09 +02:00
c0079007f2 do not overwrite dac value when pid is disengaged 2020-05-13 22:11:25 +02:00
b9d05ff274 channels: add set_dac() 2020-05-13 21:05:07 +02:00
eb9aeb160a add Channels::read_ref_adc() 2020-05-13 00:15:29 +02:00
3d1740b23b refactor into Channels::poll_adc() 2020-05-13 00:04:55 +02:00
9466961bd7 main: refactor into Channel/Channels 2020-05-12 23:18:11 +02:00
6dd6bb2e1e pins: add ref[01] adc 2020-05-12 22:50:39 +02:00
56c62975c4 main: improve show pid parameters 2020-03-23 23:02:50 +01:00
d203f21caf main: re-enable interrupts
also swap ADC polling and network processing to read the ADC first after
an interrupt.
2020-03-21 00:46:24 +01:00
15f64358a2 main: fix socket handling 2020-03-21 00:37:24 +01:00
7fe1d2f761 main: disable ad7172 sync 2020-03-21 00:36:52 +01:00
dcf7babf32 ad7172: delint, doc 2020-03-21 00:34:22 +01:00
e7782c9cb3 implement shdn* pins 2020-03-21 00:33:48 +01:00
b345cc0865 use embedded_hal through stm32f4xx_hal instead of direct dependency
this will aid maintainability.
2020-03-21 00:22:38 +01:00
a102e5fcec main: wait for more tcp send headroom 2020-03-21 00:11:23 +01:00
10f7020c02 main: fix report padding 2020-03-21 00:11:03 +01:00
da65ea21a4 ad7172: eliminate superfluous AdcError 2020-03-21 00:10:12 +01:00
9c3485d05f timer: increase rate to 500 Hz
timestamp precision: 0.002s
2020-03-21 00:07:18 +01:00
8e41c44303 adc: use ref_sel=external 2020-03-21 00:06:27 +01:00
1cba8e56c9 ad7172: add calibrate_offset() 2020-03-21 00:06:09 +01:00
63cc1d2fe1 main: always do full session reset 2020-03-20 23:20:50 +01:00
194871c85a ad7172: readback after write_reg() 2020-03-20 23:19:31 +01:00
4c3c8498e9 ad7172: retry corrupt transfers 2020-03-20 00:45:40 +01:00
82dba2bb67 ad7172: work on adc setup 2020-03-20 00:45:10 +01:00
bb51cce6f6 ad7172: remove stale code 2020-03-19 23:46:55 +01:00
723901b341 adc: read u32 for unipolar coding 2020-03-19 23:39:06 +01:00
2e72a03b93 steinhart_hart: fix equation 2020-03-19 22:56:14 +01:00
bec7019f3a delint 2020-03-19 22:21:17 +01:00
c00c1bb081 main: connect adc/sh/pid/dac, split out into mod channel_state 2020-03-19 22:11:36 +01:00
a94650e208 main: optimize+doc resets 2020-03-19 22:01:16 +01:00
163bb38f68 simplify pid, keep last_output 2020-03-19 22:00:22 +01:00
e5b4789304 replace dependency lexical-core with num-traits 2020-03-19 19:51:59 +01:00
da4aaf4ff6 implement all the tcp commands 2020-03-19 18:34:57 +01:00
cee0a1fcab steinhart_hart: fix calculation, rename parameters 2020-03-19 00:23:41 +01:00
0f4442b124 switch pid+steinhart_hart parameters from f32 to f64 2020-03-18 21:56:52 +01:00
1ad821299b build mods pid + steinhard_hart 2020-03-18 21:51:30 +01:00
0575b52bc1 session: eliminate copying LineResult wrapper 2020-03-18 21:34:20 +01:00
ac728a2aff server: reduce sockets from 8 to 4 for memory savings 2020-03-18 21:15:34 +01:00
69a4f5a5d2 merge the network code 2020-03-13 23:39:22 +01:00
09dbb7d495 add ad5680 2020-03-12 21:41:03 +01:00
fed3e767e9 pins: setup dac spi 0,1 2020-03-12 19:25:21 +01:00
89b0d142ad main: use HSE clock
supposed to lead to more stable pwm
2020-03-12 18:32:07 +01:00
f021ebd6e6 pins: setup PwmPins 2020-03-12 17:26:14 +01:00
ac336b7a26 main: split into mod init_log 2020-03-12 00:50:24 +01:00
c377706e0e ad7172: move setup from main 2020-03-12 00:44:28 +01:00
44c8ff54c1 ad7172::checksum: improve 2020-03-12 00:43:52 +01:00
95d66438d2 main: use sensible WATCHDOG_INTERVAL 2020-03-11 23:17:34 +01:00
297e38e1cc main: ignore warnings for now 2020-03-11 23:17:17 +01:00
99f7f2b548 Pins::setup, replace adc_input with ad7172 2020-03-11 23:16:48 +01:00
60a9c72bf0 led: remove 2020-03-09 23:58:46 +01:00
2f50071afa switch to stm32f427, setup eth pins 2020-03-09 00:36:19 +01:00
72b44b4b22 update dependency stm32f4xx-hal to 0.7 2020-03-09 00:07:56 +01:00
573d5ed6c8 update rust and smoltcp 2020-03-08 23:49:56 +01:00
27d5684782 rename to thermostat 2019-06-01 10:14:32 +08:00
e6395eaf9d clippy delint 2019-04-27 15:25:27 +02:00
70236a2060 rust edition 2018 delint 2019-04-27 15:23:50 +02:00
2d758af9e4 add feature "generate-hwaddr" to generate indivudal MAC addrs from device electronic signature 2019-03-21 17:41:33 +01:00
3f6bb05001 setup clocks to 168 mhz, adjust TIMER_RATE to 20
systick must elapse more often at higher clock.
2019-03-18 22:04:34 +01:00
19a1609238 doc 2019-03-18 21:41:51 +01:00
7423f23969 timer: lower TIMER_RATE to 10 Hz
1 Hz would be sufficient for the current OUTPUT_INTERVAL but that seems
too low for the hardware.
2019-03-18 21:41:18 +01:00
3770fe743a deny compiler warnings 2019-03-18 21:40:03 +01:00
987f881ffa main: remove unused compiler feature never_type 2019-03-18 21:39:34 +01:00
9ec32ca0a2 main: fix wfi, revise leds, unreachable end 2019-03-18 21:18:20 +01:00
9af94e7616 server.poll(): doc, clean-up, pass smoltcp errors 2019-03-18 21:17:02 +01:00
38b7e1b871 adc_input: make synchronous and simplify 2019-03-18 20:56:29 +01:00
1832bd5884 net, server: put tcp storage on stack 2019-03-18 20:02:57 +01:00
e6125581fd main: repurpose led activity, obtain fresh time 2019-03-14 22:07:52 +01:00
384b537555 net: maintain NET_PENDING flag 2019-03-14 22:02:25 +01:00
689f33304d main: lower watchdog timeout to 1s 2019-03-14 22:01:01 +01:00
1f80b456f3 add nucleo-f429zi board leds 2019-03-14 20:55:42 +01:00