Skip to content

Commit

Permalink
Merge branch 'release/0.10.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
jara001 committed Apr 9, 2024
2 parents a33a2be + 970d086 commit ae45724
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/).

## Unreleased
## 0.10.4 - 2024-04-09
### Added
- `reconfigure`
- `ParameterServer.getValue()` to obtain the parameter value.

## 0.10.3 - 2024-04-09
### Added
- Before building the project, all uncommitted changes are stashed.
Expand Down
24 changes: 24 additions & 0 deletions autopsy/reconfigure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1011,6 +1011,30 @@ def __contains__(self, name):
return name in self._parameters


def getValue(self, name):
"""Obtain a value of parameter 'name'.
Arguments:
name -- name of the parameter, str
Returns:
value -- value of the parameter, any
Raises:
ValueError -- when parameter with name 'name' does not exist
Note: This serves as a compatibility layer with other versions
of parameter handling classes. All parameters can be still accessed
using the dot notation.
"""
if not self.__contains__(name):
raise ValueError(
"Parameter with name '%s' does not exist." % name
)

return self._parameters[name].value


def link(self, param1, param2):
"""Links two constrained parameters together so one cannot be more then the other.
Expand Down
2 changes: 1 addition & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>autopsy</name>
<version>0.10.3</version>
<version>0.10.4</version>
<description>A set of Python utils for F1Tenth project.</description>

<maintainer email="[email protected]">Jaroslav Klapálek</maintainer>
Expand Down

0 comments on commit ae45724

Please sign in to comment.