Skip to content

Commit

Permalink
Reverted set_ntc_parameters() back to standard python data types
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickBaus committed Jul 15, 2022
1 parent 1a24c9e commit e9c5d45
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion hp3478a_async/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# pylint: disable=missing-module-docstring
__version__ = "1.4.0"
__version__ = "1.4.1"
16 changes: 13 additions & 3 deletions hp3478a_async/hp_3478a.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ async def disconnect(self) -> None:
finally:
await self.__conn.disconnect()

def set_ntc_parameters(self, parameters: NtcParameters):
def set_ntc_parameters(
self, a: float, b: float, c: float, d: float, rt25: float
): # pylint: disable=invalid-name,too-many-arguments # this is standard naming convention
"""
Set the parameters used when in mode :attr:`FunctionType.NTC <hp3478a_async.enums.FunctionType.NTC>` or
:attr:`FunctionType.NTCF <hp3478a_async.enums.FunctionType.NTCF>`. The parameters can be found in the datasheet
Expand All @@ -185,10 +187,18 @@ def set_ntc_parameters(self, parameters: NtcParameters):
Parameters
----------
parameters: NtcParameters
a: float
The parameters of the NTC thermistor used
b: float
The parameters of the NTC thermistor used
c: float
The parameters of the NTC thermistor used
d: float
The parameters of the NTC thermistor used
rt25: float
The resistance of the NTC at 25 °C
"""
self.__ntc_parameters = parameters
self.__ntc_parameters = NtcParameters(a, b, c, d, rt25)

@staticmethod
def __convert_thermistor_to_temperature(value: Decimal, ntc_parameters: NtcParameters) -> Decimal:
Expand Down

0 comments on commit e9c5d45

Please sign in to comment.