Added DC Load driver for Rigol DL3021#257
Conversation
daniel-montanari
left a comment
There was a problem hiding this comment.
Generally looks good, need to set up pre-commit.
daniel-montanari
left a comment
There was a problem hiding this comment.
Can you bump the version to 0.6.5 in src/fixate/init.py
Update docs/release-notes.rst
| ... | ||
|
|
||
| def set_enabled(self, enable: bool) -> None: | ||
| """Enable (1) or disable (0) the load.""" |
There was a problem hiding this comment.
If this is a bool it should be True/False
| ] | ||
|
|
||
|
|
||
| class DCLoad(Protocol): |
There was a problem hiding this comment.
I think we also need to add this.
from fixate.drivers import DriverProtocol
Then update the helper class
class DCLoad(DriverProtocol, Protocol):
This will sync up the log_instrument_open call which doesn't use the helper.
|
|
||
| return self.write(f":SOUR:FUNC {scpi_mode}") | ||
|
|
||
| def get_mode(self) -> str: |
There was a problem hiding this comment.
If functions like this are only being used for testing then they should be prefixed with an _ to indicate they are private to this class
| def __init__(self, instrument: Any) -> None: | ||
| self.instrument = instrument | ||
| self.instrument.timeout = 1000 | ||
| self._set_current_range = None |
There was a problem hiding this comment.
self._set_current_range:float|None = None
| Version 0.6.5 | ||
| ************* | ||
| Release Date xx-xx-xxxx | ||
| Release Date 03/06/2026 |
There was a problem hiding this comment.
roll this back, we still don't have a plan to release this yet.
| return float(self.query(":SOUR:CURR:LEV:IMM?").strip()) | ||
| return float(self._query(":SOUR:CURR:LEV:IMM?").strip()) | ||
|
|
||
| def set_current_range(self, current_range: float) -> None: |
There was a problem hiding this comment.
Can this be any value? Or is this like a multimeter where you will only have fixed increments you can set this to?
Added DC Load driver for Rigol DL3021