-
Notifications
You must be signed in to change notification settings - Fork 668
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(bluetooth_monitor): rework parameters (#5239)
* refactor(bluetooth_monitor): rework parameters Signed-off-by: Yuqi Huai <[email protected]> * style(pre-commit): autofix * doc(bluetooth_monitor): fix default for integer parameters Signed-off-by: Yuqi Huai <[email protected]> * doc(bluetooth_monitor): add default for parameter addresses Signed-off-by: Yuqi Huai <[email protected]> * style(pre-commit): autofix * doc(bluetooth_monitor): fix parameter description --------- Signed-off-by: Yuqi Huai <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
7d7c93e
commit 5df706e
Showing
3 changed files
with
56 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
system/bluetooth_monitor/schema/bluetooth_monitor.shcema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Parameters for bluetooth monitor", | ||
"type": "object", | ||
"definitions": { | ||
"bluetooth_monitor": { | ||
"type": "object", | ||
"properties": { | ||
"address": { | ||
"type": "array", | ||
"description": "Bluetooth addresses of the device to monitor", | ||
"items": { | ||
"type": "string" | ||
}, | ||
"default": ["4C:B9:9B:6E:7F:9A"] | ||
}, | ||
"port": { | ||
"type": "integer", | ||
"description": "Port number to connect to L2ping service on the host", | ||
"default": 7640 | ||
}, | ||
"timeout": { | ||
"type": "integer", | ||
"description": "Time in seconds to wait for a response from the device", | ||
"default": 5 | ||
}, | ||
"rtt_warn": { | ||
"type": "number", | ||
"description": "Time in seconds to warn if the round trip time is greater than this value", | ||
"default": 0.1 | ||
} | ||
}, | ||
"required": ["address", "port", "timeout", "rtt_warn"], | ||
"additionalProperties": false | ||
} | ||
}, | ||
"properties": { | ||
"/**": { | ||
"type": "object", | ||
"properties": { | ||
"ros__parameters": { | ||
"$ref": "#/definitions/bluetooth_monitor" | ||
} | ||
}, | ||
"required": ["ros__parameters"], | ||
"additionalProperties": false | ||
} | ||
}, | ||
"required": ["/**"], | ||
"additionalProperties": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters