Utilities
This section shows general objects and helper functions that are used with this package.
Note
This BalderHub project doesn’t have any utilities.
Optical Heart Beat Simulation
- class balderhub.heart.lib.utils.optical_simulation.TkinterOpticalHeartBeatSimulation(position: tuple[int, int], size: tuple[int, int] = (200, 200), color_config: ColorConfiguration | None = None)
Bases:
objectSimulator class that creates an own tkinter process to simulate heart beat behavior for optical sensors.
- close_window() None
This method closes the window and stops the process
- open_window() None
This method opens the window and starts the process
- class balderhub.heart.lib.utils.optical_simulation.Command(value)
Bases:
Enumenum with all possible commands
- class balderhub.heart.lib.utils.optical_simulation.ColorConfiguration
Bases:
objectcolor configuration dataclass that can be adjusted to the requirements of the DUT
- get_color(for_alpha: float) str
Returns the corresponding color for the given alpha value and based on the min/max values of the color configuration
- Parameters:
for_alpha – current alpha value that should be applied
- Returns:
the color string