Skip to content

Commit 6c3d555

Browse files
authored
Merge pull request #2382 from tannewt/scannable_connectable_extended_error
Add extended, connectable and scannable error.
2 parents 10183d5 + 51ba0ed commit 6c3d555

File tree

14 files changed

+72
-14
lines changed

14 files changed

+72
-14
lines changed

locale/ID.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2019-12-12 14:51-0500\n"
11+
"POT-Creation-Date: 2019-12-12 15:33-0800\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -419,6 +419,10 @@ msgstr "Tidak bisa mendapatkan pull pada saat mode output"
419419
msgid "Cannot get temperature"
420420
msgstr "Tidak bisa mendapatkan temperatur. status: 0x%02x"
421421

422+
#: shared-bindings/_bleio/Adapter.c
423+
msgid "Cannot have scan responses for extended, connectable advertisements."
424+
msgstr ""
425+
422426
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
423427
msgid "Cannot output both channels on the same pin"
424428
msgstr ""

locale/circuitpython.pot

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2019-12-12 15:51-0500\n"
11+
"POT-Creation-Date: 2019-12-12 15:33-0800\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -413,6 +413,10 @@ msgstr ""
413413
msgid "Cannot get temperature"
414414
msgstr ""
415415

416+
#: shared-bindings/_bleio/Adapter.c
417+
msgid "Cannot have scan responses for extended, connectable advertisements."
418+
msgstr ""
419+
416420
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
417421
msgid "Cannot output both channels on the same pin"
418422
msgstr ""

locale/de_DE.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: \n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2019-12-12 14:51-0500\n"
10+
"POT-Creation-Date: 2019-12-12 15:33-0800\n"
1111
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
1212
"Last-Translator: Pascal Deneaux\n"
1313
"Language-Team: Sebastian Plamauer, Pascal Deneaux\n"
@@ -417,6 +417,10 @@ msgstr "Pull up im Ausgabemodus nicht möglich"
417417
msgid "Cannot get temperature"
418418
msgstr "Kann Temperatur nicht holen"
419419

420+
#: shared-bindings/_bleio/Adapter.c
421+
msgid "Cannot have scan responses for extended, connectable advertisements."
422+
msgstr ""
423+
420424
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
421425
msgid "Cannot output both channels on the same pin"
422426
msgstr "Kann nicht beite Kanäle auf dem gleichen Pin ausgeben"

locale/en_US.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: \n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2019-12-12 14:51-0500\n"
10+
"POT-Creation-Date: 2019-12-12 15:33-0800\n"
1111
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
1212
"Last-Translator: \n"
1313
"Language-Team: \n"
@@ -413,6 +413,10 @@ msgstr ""
413413
msgid "Cannot get temperature"
414414
msgstr ""
415415

416+
#: shared-bindings/_bleio/Adapter.c
417+
msgid "Cannot have scan responses for extended, connectable advertisements."
418+
msgstr ""
419+
416420
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
417421
msgid "Cannot output both channels on the same pin"
418422
msgstr ""

locale/en_x_pirate.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: \n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2019-12-12 14:51-0500\n"
10+
"POT-Creation-Date: 2019-12-12 15:33-0800\n"
1111
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
1212
"Last-Translator: \n"
1313
"Language-Team: @sommersoft, @MrCertainly\n"
@@ -417,6 +417,10 @@ msgstr ""
417417
msgid "Cannot get temperature"
418418
msgstr ""
419419

420+
#: shared-bindings/_bleio/Adapter.c
421+
msgid "Cannot have scan responses for extended, connectable advertisements."
422+
msgstr ""
423+
420424
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
421425
msgid "Cannot output both channels on the same pin"
422426
msgstr ""

locale/es.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: \n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2019-12-12 14:51-0500\n"
10+
"POT-Creation-Date: 2019-12-12 15:33-0800\n"
1111
"PO-Revision-Date: 2018-08-24 22:56-0500\n"
1212
"Last-Translator: \n"
1313
"Language-Team: \n"
@@ -419,6 +419,10 @@ msgstr "No puede ser pull mientras este en modo de salida"
419419
msgid "Cannot get temperature"
420420
msgstr "No se puede obtener la temperatura."
421421

422+
#: shared-bindings/_bleio/Adapter.c
423+
msgid "Cannot have scan responses for extended, connectable advertisements."
424+
msgstr ""
425+
422426
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
423427
msgid "Cannot output both channels on the same pin"
424428
msgstr "No se puede tener ambos canales en el mismo pin"

locale/fil.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: \n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2019-12-12 14:51-0500\n"
10+
"POT-Creation-Date: 2019-12-12 15:33-0800\n"
1111
"PO-Revision-Date: 2018-12-20 22:15-0800\n"
1212
"Last-Translator: Timothy <[email protected]>\n"
1313
"Language-Team: fil\n"
@@ -421,6 +421,10 @@ msgstr "Hindi makakakuha ng pull habang nasa output mode"
421421
msgid "Cannot get temperature"
422422
msgstr "Hindi makuha ang temperatura. status 0x%02x"
423423

424+
#: shared-bindings/_bleio/Adapter.c
425+
msgid "Cannot have scan responses for extended, connectable advertisements."
426+
msgstr ""
427+
424428
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
425429
msgid "Cannot output both channels on the same pin"
426430
msgstr "Hindi maaaring output ang mga parehong channel sa parehong pin"

locale/fr.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: 0.1\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2019-12-12 14:51-0500\n"
11+
"POT-Creation-Date: 2019-12-12 15:33-0800\n"
1212
"PO-Revision-Date: 2019-04-14 20:05+0100\n"
1313
"Last-Translator: Pierrick Couturier <[email protected]>\n"
1414
"Language-Team: fr\n"
@@ -425,6 +425,10 @@ msgstr "Ne peut être tiré ('pull') en mode 'output'"
425425
msgid "Cannot get temperature"
426426
msgstr "Impossible de lire la température"
427427

428+
#: shared-bindings/_bleio/Adapter.c
429+
msgid "Cannot have scan responses for extended, connectable advertisements."
430+
msgstr ""
431+
428432
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
429433
msgid "Cannot output both channels on the same pin"
430434
msgstr "Les 2 canaux de sortie ne peuvent être sur la même broche"

locale/it_IT.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2019-12-12 14:51-0500\n"
11+
"POT-Creation-Date: 2019-12-12 15:33-0800\n"
1212
"PO-Revision-Date: 2018-10-02 16:27+0200\n"
1313
"Last-Translator: Enrico Paganin <[email protected]>\n"
1414
"Language-Team: \n"
@@ -421,6 +421,10 @@ msgstr "non si può tirare quando nella modalita output"
421421
msgid "Cannot get temperature"
422422
msgstr "Impossibile leggere la temperatura. status: 0x%02x"
423423

424+
#: shared-bindings/_bleio/Adapter.c
425+
msgid "Cannot have scan responses for extended, connectable advertisements."
426+
msgstr ""
427+
424428
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
425429
msgid "Cannot output both channels on the same pin"
426430
msgstr "Impossibile dare in output entrambi i canal sullo stesso pin"

locale/ko.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2019-12-12 14:51-0500\n"
11+
"POT-Creation-Date: 2019-12-12 15:33-0800\n"
1212
"PO-Revision-Date: 2019-05-06 14:22-0700\n"
1313
"Last-Translator: \n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -417,6 +417,10 @@ msgstr ""
417417
msgid "Cannot get temperature"
418418
msgstr "온도 데이터를 수신 할 수 없습니다"
419419

420+
#: shared-bindings/_bleio/Adapter.c
421+
msgid "Cannot have scan responses for extended, connectable advertisements."
422+
msgstr ""
423+
420424
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
421425
msgid "Cannot output both channels on the same pin"
422426
msgstr ""

locale/pl.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: \n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2019-12-12 14:51-0500\n"
10+
"POT-Creation-Date: 2019-12-12 15:33-0800\n"
1111
"PO-Revision-Date: 2019-03-19 18:37-0700\n"
1212
"Last-Translator: Radomir Dopieralski <[email protected]>\n"
1313
"Language-Team: pl\n"
@@ -416,6 +416,10 @@ msgstr "Nie ma podciągnięcia w trybie wyjścia"
416416
msgid "Cannot get temperature"
417417
msgstr "Nie można odczytać temperatury"
418418

419+
#: shared-bindings/_bleio/Adapter.c
420+
msgid "Cannot have scan responses for extended, connectable advertisements."
421+
msgstr ""
422+
419423
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
420424
msgid "Cannot output both channels on the same pin"
421425
msgstr "Nie można mieć obu kanałów na tej samej nóżce"

locale/pt_BR.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2019-12-12 14:51-0500\n"
11+
"POT-Creation-Date: 2019-12-12 15:33-0800\n"
1212
"PO-Revision-Date: 2018-10-02 21:14-0000\n"
1313
"Last-Translator: \n"
1414
"Language-Team: \n"
@@ -418,6 +418,10 @@ msgstr ""
418418
msgid "Cannot get temperature"
419419
msgstr "Não pode obter a temperatura. status: 0x%02x"
420420

421+
#: shared-bindings/_bleio/Adapter.c
422+
msgid "Cannot have scan responses for extended, connectable advertisements."
423+
msgstr ""
424+
421425
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
422426
msgid "Cannot output both channels on the same pin"
423427
msgstr ""

locale/zh_Latn_pinyin.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: circuitpython-cn\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2019-12-12 14:51-0500\n"
10+
"POT-Creation-Date: 2019-12-12 15:33-0800\n"
1111
"PO-Revision-Date: 2019-04-13 10:10-0700\n"
1212
"Last-Translator: hexthat\n"
1313
"Language-Team: Chinese Hanyu Pinyin\n"
@@ -417,6 +417,10 @@ msgstr "Zài shūchū móshì xià wúfǎ huòqǔ lādòng"
417417
msgid "Cannot get temperature"
418418
msgstr "Wúfǎ huòqǔ wēndù"
419419

420+
#: shared-bindings/_bleio/Adapter.c
421+
msgid "Cannot have scan responses for extended, connectable advertisements."
422+
msgstr ""
423+
420424
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
421425
msgid "Cannot output both channels on the same pin"
422426
msgstr "Wúfǎ shūchū tóng yīgè yǐn jiǎo shàng de liǎng gè píndào"

shared-bindings/_bleio/Adapter.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
#include "py/objproperty.h"
3131
#include "py/runtime.h"
32+
#include "shared-bindings/_bleio/__init__.h"
3233
#include "shared-bindings/_bleio/Address.h"
3334
#include "shared-bindings/_bleio/Adapter.h"
3435

@@ -185,7 +186,12 @@ STATIC mp_obj_t bleio_adapter_start_advertising(mp_uint_t n_args, const mp_obj_t
185186
ADV_INTERVAL_MIN_STRING, ADV_INTERVAL_MAX_STRING);
186187
}
187188

188-
common_hal_bleio_adapter_start_advertising(self, args[ARG_connectable].u_bool, interval,
189+
bool connectable = args[ARG_connectable].u_bool;
190+
if (data_bufinfo.len > 31 && connectable && scan_response_bufinfo.len > 0) {
191+
mp_raise_bleio_BluetoothError(translate("Cannot have scan responses for extended, connectable advertisements."));
192+
}
193+
194+
common_hal_bleio_adapter_start_advertising(self, connectable, interval,
189195
&data_bufinfo, &scan_response_bufinfo);
190196

191197
return mp_const_none;

0 commit comments

Comments
 (0)