Commit Graph

88 Commits

Author SHA1 Message Date
linuswck 4d8e16771e gui: Correct Pid Autotune output current limit 2024-10-29 12:59:15 +08:00
linuswck 4d332328c0 gui: Limit min PD Mon Pwr y axis range to 0-100uW 2024-10-23 12:24:57 +08:00
linuswck 49dc8a9b96 gui: autotuner only set_i when relay state changes
- Previously, autotuner issues set_i cmd for each report obj received
- These change increase the maximum autotune-able PID update rate with GUI
2024-10-22 18:09:39 +08:00
linuswck a1b7538295 driver: Fix disconnection bug at high cmd rate
- Disconnection issue can be triggered by setting high polling rate
(500Hz) and then interactive with gui elements
2024-10-22 18:09:28 +08:00
linuswck 8f5a294a53 gui: Fix graphs' refresh rate to be 10Hz
- Reduce unnecessary CPU usage
2024-10-22 10:57:55 +08:00
linuswck 87b0e1bf67 gui: rm sIPrefix from PD Current readings 2024-10-21 11:15:15 +08:00
linuswck 35f66c3516 gui: Change LD, Thermostat Status Display Method
- Use combinations of label and stylesheet border to create visual cue for status
2024-10-18 17:33:54 +08:00
linuswck dd7e1bbbdd gui: Adjust y_axis limit range of graphs 2024-10-18 17:33:09 +08:00
linuswck a3b38fc6b7 gui: Unify the param tree unit formatting style 2024-10-18 17:33:01 +08:00
linuswck f4c761c5ca pid: Scale PID Parameters with Sampling Rate
- Breaking changes
2024-10-17 17:36:06 +08:00
linuswck e560d8f1eb thermostat, gui: Set max v range according to datasheet 2024-10-16 16:21:11 +08:00
linuswck 0437c6e76e thermostat, gui: Relax the max settable TEC Current Limit
- Improper settings can cause PoE power failure and over heating
- See hardware repo Issue #51
2024-10-16 16:14:58 +08:00
linuswck bad21806f8 gui: Add new form for temp adc filter cfg and settable polling rate
List of Changes:
1. Get report via polling instead of active report mode
2. Allow user to set a custom report polling rate while settings polling rate is fixed to 10Hz
- it is necessary for pid autotune to function correctly
3. Add a form for configuring temperature adc filter
4. Use two different timer for polling report and settings to optimize performance

Known Issue:
1. CPU utilization increases with the report polling rate as for each report recv-ed, gui renders and plots one frame of the 4 graphs
2024-10-10 17:25:33 +08:00
linuswck cb2bc505c9 driver: expose _odr_type for filter cfgs 2024-10-10 17:25:29 +08:00
linuswck 4f19d2c2be driver: Expose the upper and lower limit settings for Sinc3WithFineODR Filter Cfg 2024-10-10 15:23:57 +08:00
linuswck e8d3858fc9 driver: return whether task queue is full in task_dispatcher() 2024-10-10 15:20:58 +08:00
linuswck 9bec56ed6c driver: Add support for GetPollInterval cmd 2024-10-10 15:19:43 +08:00
linuswck 76f7875e3a gui: await for hard rst and dfu action 2024-09-11 17:54:23 +08:00
linuswck 0d64d62fb0 gui: Add pd_mon config form
- force user to follow a sequence of steps for safely configuring pd_mon
2024-09-11 17:54:18 +08:00
linuswck 89a1270c02 driver: send cmd err msg to a pyqt sig 2024-09-11 17:05:38 +08:00
linuswck c2e78e6f17 driver: Support ApplyPdParams cmd
- Include handling mechanism for "InvalidSettings"b response msg
2024-09-11 17:05:38 +08:00
linuswck 1111967a7b gui: add arg for saving log to a file 2024-09-04 17:21:13 +08:00
linuswck 6d4b1b0574 driver: end_session if ConnClose & Dfu is recv-ed 2024-09-04 16:10:42 +08:00
linuswck 838592c812 gui: Display hw_rev when connected 2024-09-04 15:46:43 +08:00
linuswck e632cbbfdd driver: use readuntil to get response msg
- The driver may recv partial ctrl msg, which causes a json decode error
2024-09-04 15:46:43 +08:00
linuswck 27bf573010 driver: retrieve hw_rev after conn is established 2024-09-04 15:45:27 +08:00
linuswck c267c30b89 driver: add get_hw_rev() fn 2024-09-04 15:39:27 +08:00
linuswck 6782cda790 Update pid autotuner code 2024-09-04 15:39:27 +08:00
linuswck 2fe2ef531b Update example code 2024-09-04 15:39:27 +08:00
linuswck f2ad06ecae gui: patch the GUI code 2024-09-04 15:39:27 +08:00
linuswck 5166bb7ba8 driver: rm thread use & make it asyncio callable
- make all cmds asyncio callable
- control specific cmds can be enqueued to the handler synchronously
2024-09-04 15:39:21 +08:00
linuswck 3d2294a90c driver: fix incorrect recv_response behavior 2024-08-27 18:49:13 +08:00
linuswck af73ac8127 gui: Add text for LD & Thermostat status 2024-08-07 12:48:12 +08:00
linuswck 8c8ed12522 gui: Disable param tree compact height
- The displayed number was clipped by the pyqtgraph spinbox
2024-08-06 13:01:57 +08:00
linuswck 572e2dbc5d gui: update for the new driver code
- Default to use active report mode
- Connection will be retried upon abnormal disconnection
- Remove poll every _s and apply btn
2024-08-06 13:01:57 +08:00
linuswck 82c46e04d0 Update PID Autotune Code for Driver Code 2024-08-06 13:01:57 +08:00
linuswck 28f8c3c497 Update Example Code for Driver Code 2024-08-06 13:01:57 +08:00
linuswck 47bf166ecb driver: kirdy driver rewrite
- Start a new thread to handle connections and schedule FIFO task execution
- Make all the cmd accessible without using async
- Connections automatically retry upon disconnection
- Add support for PyQt6 Signal
2024-08-06 13:01:54 +08:00
linuswck 1dcac25574 gui: Use a custom regex to handle the suffix with temperature characters 2024-07-31 11:35:04 +08:00
linuswck c241d34434 gui: fix default units and mv to params' titles
- siPrefix(eg. m, u, k) is no longer editable and fixed
- the displayed unit is relocated to ctrl panel params' titles
2024-07-26 11:10:28 +08:00
linuswck 20c3d42dd7 rm ld soft current limit 2024-07-25 15:53:00 +08:00
linuswck aae89256c3 gui: fix ctrl_panel value getting overwritten bug 2024-07-24 12:19:26 +08:00
linuswck 3344e7ab19 rm debug comments 2024-07-23 10:39:33 +08:00
linuswck b95b9dcefa gui: Display -273.15 if thermistor is not detected
- if tec_temp == None -> Hide temp_plot graph and display -273.15 on ctrl panel
2024-07-19 18:37:52 +08:00
linuswck 5e6a4c0646 gui: Do not turn on report mode for PID Autotune 2024-07-19 18:24:14 +08:00
linuswck ec5bf1d6b6 gui, ld: term_status -> term_50ohm
- term_status (Is50Ohm / Not50Ohm) -> term_50ohm (On/Off)
2024-07-19 18:10:38 +08:00
linuswck 3737c2ed59 gui: increase the connection timeout value
- 0.1s is too short. Min settable sampling rate is 1.25Sps
2024-07-19 18:10:38 +08:00
linuswck db2f76771a Update Kirdy Driver Example Code 2024-07-19 18:10:08 +08:00
linuswck 6f87cba9a6 drive: use aenum for cmd 2024-06-21 16:54:24 +08:00
linuswck 80d94270a2 fix typo 2024-06-18 15:43:36 +08:00