mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-03 22:53:44 +08:00
dcd382ffb8
* refactor: enhance parameter handling and add new parameter retrieval method - Refactored `get_param_as_byte` for better modularity and added `_to_bytes` helper function. - Introduced `getParamsAllKeysV1` to retrieve all keys with enhanced metadata. * refactor: update parameter handling and response structure in sunnylink - Modified `_to_bytes` to accept `bytes` type for improved type consistency. - Adjusted response keys in `sunnylinkd` for clarity. * fix: update `get_param_as_byte` to use corrected method for default values - Replaced `get_default` with `get_default_value` for accurate param retrieval. - Ensures consistent handling of default parameter values. * refactor: remove redundant `None` check in `sunnylinkd.py` - Streamlined parameter iteration by eliminating unnecessary `None` validation. - Simplifies logic for constructing `params_dict`. * refactor: streamline `sunnylinkd` response by removing redundant `keys_v1` field - Simplified return structure by excluding unused `keys_v1` key. - Reduces response payload for improved efficiency. * refactor: split `getParamsAllKeys` into distinct functions for improved clarity - Added `getParamsAllKeysV1` to preserve original metadata-rich behavior. - Revised `getParamsAllKeys` to return a simplified list of parameter keys. * style: remove extraneous newline in `sunnylinkd.py` - Ensures consistent formatting and adheres to style guidelines. * Test