wokwi-features
wokwi-features copied to clipboard
Add Support for Attribute Dependency in Custom Chips
Describe the feature request: I am currently developing a custom chip simulation for an air flow sensor in the Wokwi Simulator. The sensor's behavior involves variable flow rate values depending on another attribute, specifically the 'K' value. The Wokwi Simulator custom chips AI currently doesn't support attribute dependency, which is crucial for accurately simulating the behavior of such sensors.
Use Case: The air flow sensor has different flow rate ranges based on the 'K' value:
- For K = 1000, the flow rate range is 10SLM to <50SLM.
- For K = 100, the flow rate range is 50SLM to ≤300SLM.
I need to simulate the sensor such that when the 'K' value attribute changes, the range of another attribute (the flow rate) adjusts accordingly.
Both of these attributes are set by user.
Current Limitation: The current API does not support dynamic adjustment of one attribute's range based on the value of another attribute. Here is the current JSON configuration for the custom chip:
{
"name": "airFlowSensor",
"author": "",
"pins": [
"GND",
"SCL",
"SDA",
"VCC"
],
"controls": [
{
"id": "airFlowRate",
"label": "Gas Air Flow Rate",
"type": "range",
"min": 10,
"max": 50,
"step": 1
},
{
"id": "K value",
"label": "K value",
"type": "range",
"min": 100,
"max": 1000,
"step": 900
}
]
}
Requested Feature: I propose the implementation of attribute dependency within the custom chip configuration. This feature would allow for dynamic changes in one attribute's properties (such as range) based on the value of another attribute. This enhancement would significantly increase the accuracy and utility of simulations involving sensors or components with interdependent parameters.
Thank you for considering this feature request.