Skip to content

Commit 74be29c

Browse files
authored
Merge pull request #1993 from dhalbert/ble-scanner
bleio: add central and scanner functionality, cleanup bleio API, some code restructure
2 parents d12e1a8 + 1c31cf5 commit 74be29c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+2871
-3497
lines changed

conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
# List of patterns, relative to source directory, that match files and
8585
# directories to ignore when looking for source files.
8686
exclude_patterns = ["**/build*",
87+
".git",
8788
".venv",
8889
".direnv",
8990
"docs/README.md",

locale/ID.po

Lines changed: 95 additions & 79 deletions
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-06-25 17:53-0700\n"
11+
"POT-Creation-Date: 2019-07-09 09:06-0400\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"
@@ -218,16 +218,15 @@ msgstr ""
218218
msgid "A hardware interrupt channel is already in use"
219219
msgstr "Sebuah channel hardware interrupt sedang digunakan"
220220

221-
#: shared-bindings/bleio/Address.c
222-
#, c-format
223-
msgid "Address is not %d bytes long or is in wrong format"
224-
msgstr ""
225-
226221
#: shared-bindings/bleio/Address.c
227222
#, fuzzy, c-format
228223
msgid "Address must be %d bytes long"
229224
msgstr "buffers harus mempunyai panjang yang sama"
230225

226+
#: shared-bindings/bleio/Address.c
227+
msgid "Address type out of range"
228+
msgstr ""
229+
231230
#: ports/nrf/common-hal/busio/I2C.c
232231
msgid "All I2C peripherals are in use"
233232
msgstr "Semua perangkat I2C sedang digunakan"
@@ -354,20 +353,8 @@ msgstr ""
354353
msgid "Can not use dotstar with %s"
355354
msgstr ""
356355

357-
#: shared-bindings/bleio/Device.c
358-
msgid "Can't add services in Central mode"
359-
msgstr ""
360-
361-
#: shared-bindings/bleio/Device.c
362-
msgid "Can't advertise in Central mode"
363-
msgstr ""
364-
365-
#: shared-bindings/bleio/Device.c
366-
msgid "Can't change the name in Central mode"
367-
msgstr ""
368-
369-
#: shared-bindings/bleio/Device.c
370-
msgid "Can't connect in Peripheral mode"
356+
#: ports/nrf/common-hal/bleio/Characteristic.c
357+
msgid "Can't set CCCD for local Characteristic"
371358
msgstr ""
372359

373360
#: shared-bindings/displayio/Bitmap.c shared-bindings/pulseio/PulseIn.c
@@ -502,17 +489,11 @@ msgstr ""
502489
msgid "Data chunk must follow fmt chunk"
503490
msgstr ""
504491

505-
#: ports/nrf/common-hal/bleio/Broadcaster.c
506492
#: ports/nrf/common-hal/bleio/Peripheral.c
507493
#, fuzzy
508494
msgid "Data too large for advertisement packet"
509495
msgstr "Tidak bisa menyesuaikan data ke dalam paket advertisment"
510496

511-
#: ports/nrf/common-hal/bleio/Device.c
512-
#, fuzzy
513-
msgid "Data too large for the advertisement packet"
514-
msgstr "Tidak bisa menyesuaikan data ke dalam paket advertisment"
515-
516497
#: shared-bindings/audiobusio/PDMIn.c
517498
msgid "Destination capacity is smaller than destination_length."
518499
msgstr ""
@@ -550,6 +531,10 @@ msgstr ""
550531
msgid "Expected a UUID"
551532
msgstr ""
552533

534+
#: shared-bindings/bleio/Central.c
535+
msgid "Expected an Address"
536+
msgstr ""
537+
553538
#: shared-module/_pixelbuf/PixelBuf.c
554539
#, c-format
555540
msgid "Expected tuple of length %d, got %d"
@@ -559,12 +544,7 @@ msgstr ""
559544
msgid "Failed sending command."
560545
msgstr ""
561546

562-
#: ports/nrf/common-hal/bleio/Device.c
563-
#, fuzzy
564-
msgid "Failed to acquire mutex"
565-
msgstr "Gagal untuk mendapatkan mutex, status: 0x%08lX"
566-
567-
#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c
547+
#: ports/nrf/sd_mutex.c
568548
#, fuzzy, c-format
569549
msgid "Failed to acquire mutex, err 0x%04x"
570550
msgstr "Gagal untuk mendapatkan mutex, status: 0x%08lX"
@@ -574,11 +554,6 @@ msgstr "Gagal untuk mendapatkan mutex, status: 0x%08lX"
574554
msgid "Failed to add characteristic, err 0x%04x"
575555
msgstr "Gagal untuk menambahkan karakteristik, status: 0x%08lX"
576556

577-
#: ports/nrf/common-hal/bleio/Device.c
578-
#, fuzzy
579-
msgid "Failed to add service"
580-
msgstr "Gagal untuk menambahkan layanan, status: 0x%08lX"
581-
582557
#: ports/nrf/common-hal/bleio/Peripheral.c
583558
#, fuzzy, c-format
584559
msgid "Failed to add service, err 0x%04x"
@@ -599,27 +574,21 @@ msgstr "Gagal untuk megalokasikan buffer RX dari %d byte"
599574
msgid "Failed to change softdevice state"
600575
msgstr "Gagal untuk merubah status softdevice, error: 0x%08lX"
601576

602-
#: ports/nrf/common-hal/bleio/Device.c
603-
#, fuzzy
604-
msgid "Failed to connect:"
605-
msgstr "Gagal untuk menyambungkan, status: 0x%08lX"
577+
#: ports/nrf/common-hal/bleio/Peripheral.c
578+
#, c-format
579+
msgid "Failed to configure advertising, err 0x%04x"
580+
msgstr ""
606581

607-
#: ports/nrf/common-hal/bleio/Device.c
608-
#, fuzzy
609-
msgid "Failed to continue scanning"
610-
msgstr "Gagal untuk melanjutkan scanning, status: 0x%08lX"
582+
#: ports/nrf/common-hal/bleio/Central.c
583+
msgid "Failed to connect: timeout"
584+
msgstr ""
611585

612586
#: ports/nrf/common-hal/bleio/Scanner.c
613587
#, fuzzy, c-format
614588
msgid "Failed to continue scanning, err 0x%04x"
615589
msgstr "Gagal untuk melanjutkan scanning, status: 0x%08lX"
616590

617-
#: ports/nrf/common-hal/bleio/Device.c
618-
#, fuzzy
619-
msgid "Failed to create mutex"
620-
msgstr "Gagal untuk membuat mutex, status: 0x%08lX"
621-
622-
#: ports/nrf/common-hal/bleio/Device.c
591+
#: ports/nrf/common-hal/bleio/Central.c
623592
#, fuzzy
624593
msgid "Failed to discover services"
625594
msgstr "Gagal untuk menemukan layanan, status: 0x%08lX"
@@ -659,48 +628,41 @@ msgstr "Gagal untuk menulis nilai gatts, status: 0x%08lX"
659628
msgid "Failed to register Vendor-Specific UUID, err 0x%04x"
660629
msgstr "Gagal untuk menambahkan Vendor Spesific UUID, status: 0x%08lX"
661630

662-
#: ports/nrf/common-hal/bleio/Device.c
663-
#, fuzzy
664-
msgid "Failed to release mutex"
665-
msgstr "Gagal untuk melepaskan mutex, status: 0x%08lX"
666-
667-
#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c
631+
#: ports/nrf/sd_mutex.c
668632
#, fuzzy, c-format
669633
msgid "Failed to release mutex, err 0x%04x"
670634
msgstr "Gagal untuk melepaskan mutex, status: 0x%08lX"
671635

672-
#: ports/nrf/common-hal/bleio/Device.c
673-
#, fuzzy
674-
msgid "Failed to start advertising"
675-
msgstr "Gagal untuk memulai advertisement, status: 0x%08lX"
636+
#: ports/nrf/common-hal/bleio/Peripheral.c
637+
#, c-format
638+
msgid "Failed to set device name, err 0x%04x"
639+
msgstr ""
676640

677-
#: ports/nrf/common-hal/bleio/Broadcaster.c
678641
#: ports/nrf/common-hal/bleio/Peripheral.c
679642
#, fuzzy, c-format
680643
msgid "Failed to start advertising, err 0x%04x"
681644
msgstr "Gagal untuk memulai advertisement, status: 0x%08lX"
682645

683-
#: ports/nrf/common-hal/bleio/Device.c
684-
#, fuzzy
685-
msgid "Failed to start scanning"
686-
msgstr "Gagal untuk melakukan scanning, status: 0x%08lX"
646+
#: ports/nrf/common-hal/bleio/Central.c
647+
#, c-format
648+
msgid "Failed to start connecting, error 0x%04x"
649+
msgstr ""
687650

688651
#: ports/nrf/common-hal/bleio/Scanner.c
689652
#, fuzzy, c-format
690653
msgid "Failed to start scanning, err 0x%04x"
691654
msgstr "Gagal untuk melakukan scanning, status: 0x%08lX"
692655

693-
#: ports/nrf/common-hal/bleio/Device.c
694-
#, fuzzy
695-
msgid "Failed to stop advertising"
696-
msgstr "Gagal untuk memberhentikan advertisement, status: 0x%08lX"
697-
698-
#: ports/nrf/common-hal/bleio/Broadcaster.c
699656
#: ports/nrf/common-hal/bleio/Peripheral.c
700657
#, fuzzy, c-format
701658
msgid "Failed to stop advertising, err 0x%04x"
702659
msgstr "Gagal untuk memberhentikan advertisement, status: 0x%08lX"
703660

661+
#: ports/nrf/common-hal/bleio/Characteristic.c
662+
#, c-format
663+
msgid "Failed to write CCCD, err 0x%04x"
664+
msgstr ""
665+
704666
#: ports/nrf/common-hal/bleio/Characteristic.c
705667
#, fuzzy, c-format
706668
msgid "Failed to write attribute value, err 0x%04x"
@@ -916,6 +878,10 @@ msgstr ""
916878
msgid "Must be a %q subclass."
917879
msgstr ""
918880

881+
#: ports/nrf/common-hal/bleio/Characteristic.c
882+
msgid "No CCCD for this Characteristic"
883+
msgstr ""
884+
919885
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c
920886
msgid "No DAC on chip"
921887
msgstr "Tidak ada DAC (Digital Analog Converter) di dalam chip"
@@ -966,6 +932,7 @@ msgstr ""
966932
msgid "No such file/directory"
967933
msgstr ""
968934

935+
#: ports/nrf/common-hal/bleio/Characteristic.c
969936
#: shared-bindings/bleio/CharacteristicBuffer.c
970937
#, fuzzy
971938
msgid "Not connected"
@@ -1229,7 +1196,7 @@ msgid "USB Error"
12291196
msgstr ""
12301197

12311198
#: shared-bindings/bleio/UUID.c
1232-
msgid "UUID integer value not in range 0 to 0xffff"
1199+
msgid "UUID integer value must be 0-0xffff"
12331200
msgstr ""
12341201

12351202
#: shared-bindings/bleio/UUID.c
@@ -1928,8 +1895,9 @@ msgstr ""
19281895
msgid "integer required"
19291896
msgstr ""
19301897

1931-
#: ports/nrf/common-hal/bleio/Broadcaster.c
1932-
msgid "interval not in range 0.0020 to 10.24"
1898+
#: shared-bindings/bleio/Peripheral.c shared-bindings/bleio/Scanner.c
1899+
#, c-format
1900+
msgid "interval must be in range %s-%s"
19331901
msgstr ""
19341902

19351903
#: extmod/machine_i2c.c
@@ -2144,6 +2112,14 @@ msgstr "tidak ada modul yang bernama '%q'"
21442112
msgid "no such attribute"
21452113
msgstr ""
21462114

2115+
#: shared-bindings/bleio/Peripheral.c
2116+
msgid "non-Service found in services"
2117+
msgstr ""
2118+
2119+
#: ports/nrf/common-hal/bleio/Central.c
2120+
msgid "non-UUID found in service_uuids"
2121+
msgstr ""
2122+
21472123
#: py/compile.c
21482124
msgid "non-default argument follows default argument"
21492125
msgstr "argumen non-default mengikuti argumen standar(default)"
@@ -2353,10 +2329,6 @@ msgstr ""
23532329
msgid "script compilation not supported"
23542330
msgstr "kompilasi script tidak didukung"
23552331

2356-
#: shared-bindings/bleio/Peripheral.c
2357-
msgid "services includes an object that is not a Service"
2358-
msgstr ""
2359-
23602332
#: py/objstr.c
23612333
msgid "sign not allowed in string format specifier"
23622334
msgstr ""
@@ -2624,6 +2596,10 @@ msgstr ""
26242596
msgid "value_count must be > 0"
26252597
msgstr ""
26262598

2599+
#: shared-bindings/bleio/Scanner.c
2600+
msgid "window must be <= interval"
2601+
msgstr ""
2602+
26272603
#: shared-bindings/_pixelbuf/PixelBuf.c
26282604
msgid "write_args must be a list, tuple, or None"
26292605
msgstr ""
@@ -2670,6 +2646,10 @@ msgstr ""
26702646
#~ msgid "Cannot update i/f status"
26712647
#~ msgstr "Tidak dapat memperbarui status i/f"
26722648

2649+
#, fuzzy
2650+
#~ msgid "Data too large for the advertisement packet"
2651+
#~ msgstr "Tidak bisa menyesuaikan data ke dalam paket advertisment"
2652+
26732653
#~ msgid "Don't know how to pass object to native function"
26742654
#~ msgstr "Tidak tahu cara meloloskan objek ke fungsi native"
26752655

@@ -2682,6 +2662,26 @@ msgstr ""
26822662
#~ msgid "Error in ffi_prep_cif"
26832663
#~ msgstr "Errod pada ffi_prep_cif"
26842664

2665+
#, fuzzy
2666+
#~ msgid "Failed to acquire mutex"
2667+
#~ msgstr "Gagal untuk mendapatkan mutex, status: 0x%08lX"
2668+
2669+
#, fuzzy
2670+
#~ msgid "Failed to add service"
2671+
#~ msgstr "Gagal untuk menambahkan layanan, status: 0x%08lX"
2672+
2673+
#, fuzzy
2674+
#~ msgid "Failed to connect:"
2675+
#~ msgstr "Gagal untuk menyambungkan, status: 0x%08lX"
2676+
2677+
#, fuzzy
2678+
#~ msgid "Failed to continue scanning"
2679+
#~ msgstr "Gagal untuk melanjutkan scanning, status: 0x%08lX"
2680+
2681+
#, fuzzy
2682+
#~ msgid "Failed to create mutex"
2683+
#~ msgstr "Gagal untuk membuat mutex, status: 0x%08lX"
2684+
26852685
#, fuzzy
26862686
#~ msgid "Failed to notify or indicate attribute value, err %0x04x"
26872687
#~ msgstr "Gagal untuk melaporkan nilai atribut, status: 0x%08lX"
@@ -2690,6 +2690,22 @@ msgstr ""
26902690
#~ msgid "Failed to read attribute value, err %0x04x"
26912691
#~ msgstr "Gagal untuk membaca nilai atribut, status: 0x%08lX"
26922692

2693+
#, fuzzy
2694+
#~ msgid "Failed to release mutex"
2695+
#~ msgstr "Gagal untuk melepaskan mutex, status: 0x%08lX"
2696+
2697+
#, fuzzy
2698+
#~ msgid "Failed to start advertising"
2699+
#~ msgstr "Gagal untuk memulai advertisement, status: 0x%08lX"
2700+
2701+
#, fuzzy
2702+
#~ msgid "Failed to start scanning"
2703+
#~ msgstr "Gagal untuk melakukan scanning, status: 0x%08lX"
2704+
2705+
#, fuzzy
2706+
#~ msgid "Failed to stop advertising"
2707+
#~ msgstr "Gagal untuk memberhentikan advertisement, status: 0x%08lX"
2708+
26932709
#~ msgid "GPIO16 does not support pull up."
26942710
#~ msgstr "GPIO16 tidak mendukung pull up"
26952711

0 commit comments

Comments
 (0)