We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4076037 commit 2d4aee1Copy full SHA for 2d4aee1
commands/service_board_list.go
@@ -170,7 +170,7 @@ func identify(pme *packagemanager.Explorer, port *discovery.Port, settings *conf
170
171
// if installed cores didn't recognize the board, try querying
172
// the builder API if the board is a USB device port
173
- if len(boards) == 0 && !skipCloudAPI {
+ if len(boards) == 0 && !skipCloudAPI &&!settings.SkipCloudApiForBoardDetection() {
174
items, err := identifyViaCloudAPI(port.Properties, settings)
175
if err != nil {
176
// this is bad, but keep going
docs/configuration.md
@@ -46,7 +46,10 @@
46
- `network` - configuration options related to the network connection.
47
- `proxy` - URL of the proxy server.
48
- `connection_timeout` - network connection timeout, the value format must be a valid input for
49
- [time.ParseDuration()](https://pkg.go.dev/time#ParseDuration), defaults to `60s` (60 seconds). `0` means it will wait indefinitely.
+ [time.ParseDuration()](https://pkg.go.dev/time#ParseDuration), defaults to `60s` (60 seconds). `0` means it will
50
+ wait indefinitely.
51
+ - `cloud_api.skip_board_detection_calls` - if set to `true` it will make the Arduino CLI skip network calls to
52
+ Arduino Cloud API to help detection of an unknown board.
53
54
### Default directories
55
internal/cli/configuration/configuration.schema.json
@@ -154,6 +154,16 @@
154
"description": "timeout for network connections, defaults to '30s'",
155
"type": "string",
156
"pattern": "^[+-]?(([0-9]+(\\.[0-9]*)?|(\\.[0-9]+))(ns|us|μs|μs|ms|s|m|h))+$"
157
+ },
158
+ "cloud_api": {
159
+ "description": "settings related to the Arduino Cloud API.",
160
+ "type": "object",
161
+ "properties": {
162
+ "skip_board_detection_calls": {
163
+ "description": "do not call the Arduino Cloud API to detect an unknown board",
164
+ "type": "boolean"
165
+ }
166
167
}
168
169
},
internal/cli/configuration/defaults.go
@@ -72,6 +72,8 @@ func SetDefaults(settings *Settings) {
72
setKeyTypeSchema("network.proxy", "")
73
setKeyTypeSchema("network.user_agent_ext", "")
74
setDefaultValueAndKeyTypeSchema("network.connection_timeout", (time.Second * 60).String())
75
+ // network: Arduino Cloud API settings
76
+ setKeyTypeSchema("network.cloud_api.skip_board_detection_calls", false)
77
78
// locale
79
setKeyTypeSchema("locale", "")
internal/cli/configuration/network.go
@@ -67,6 +67,11 @@ func (settings *Settings) ConnectionTimeout() time.Duration {
67
return settings.Defaults.GetDuration("network.connection_timeout")
68
69
70
+// SkipCloudApiForBoardDetection returns whether the cloud API should be ignored for board detection
71
+func (settings *Settings) SkipCloudApiForBoardDetection() bool {
+ return settings.GetBool("network.cloud_api.skip_board_detection_calls")
+}
+
// NetworkProxy returns the proxy configuration (mainly used by HTTP clients)
func (settings *Settings) NetworkProxy() (*url.URL, error) {
if proxyConfig, ok, _ := settings.GetStringOk("network.proxy"); !ok {
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments