Skip to content

Commit f279a2d

Browse files
authored
Merge branch 'adafruit:main' into adcdma
2 parents c1f57c6 + dd37c81 commit f279a2d

File tree

372 files changed

+1348
-3899
lines changed

Some content is hidden

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

372 files changed

+1348
-3899
lines changed

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ concurrency:
1414

1515
jobs:
1616
pre-commit:
17-
runs-on: ubuntu-20.04
17+
runs-on: ubuntu-22.04
1818
steps:
1919
- uses: actions/[email protected]
2020
- name: Set up Python 3
@@ -23,7 +23,6 @@ jobs:
2323
python-version: "3.x"
2424
- name: Install deps
2525
run: |
26-
sudo apt-add-repository -y -u ppa:pybricks/ppa
2726
sudo apt-get install -y gettext uncrustify
2827
pip3 install black polib pyyaml
2928
- name: Populate selected submodules

locale/pt_BR.po

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ msgstr ""
66
"Project-Id-Version: PACKAGE VERSION\n"
77
"Report-Msgid-Bugs-To: \n"
88
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
9-
"PO-Revision-Date: 2022-08-10 07:18+0000\n"
9+
"PO-Revision-Date: 2022-09-05 04:21+0000\n"
1010
"Last-Translator: Wellington Terumi Uemura <[email protected]>\n"
1111
"Language-Team: \n"
1212
"Language: pt_BR\n"
1313
"MIME-Version: 1.0\n"
1414
"Content-Type: text/plain; charset=UTF-8\n"
1515
"Content-Transfer-Encoding: 8bit\n"
1616
"Plural-Forms: nplurals=2; plural=n > 1;\n"
17-
"X-Generator: Weblate 4.14-dev\n"
17+
"X-Generator: Weblate 4.14.1-dev\n"
1818

1919
#: main.c
2020
msgid ""
@@ -2970,6 +2970,8 @@ msgid ""
29702970
"esp32_camera.Camera requires reserved PSRAM to be configured. See the "
29712971
"documentation for instructions."
29722972
msgstr ""
2973+
"esp32_camera.Camera requer que uma reserva PSRAM seja configurada. Consulte "
2974+
"a documentação para obter mais informações."
29732975

29742976
#: py/runtime.c
29752977
msgid "exceptions must derive from BaseException"

main.c

Lines changed: 47 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
#include "supervisor/shared/stack.h"
5858
#include "supervisor/shared/status_leds.h"
5959
#include "supervisor/shared/tick.h"
60-
#include "supervisor/shared/title_bar.h"
6160
#include "supervisor/shared/traceback.h"
6261
#include "supervisor/shared/translate/translate.h"
6362
#include "supervisor/shared/workflow.h"
@@ -106,6 +105,10 @@
106105
#include "shared-bindings/socketpool/__init__.h"
107106
#endif
108107

108+
#if CIRCUITPY_STATUS_BAR
109+
#include "supervisor/shared/status_bar.h"
110+
#endif
111+
109112
#if CIRCUITPY_USB_HID
110113
#include "shared-module/usb_hid/__init__.h"
111114
#endif
@@ -208,6 +211,7 @@ STATIC const char *_current_executing_filename = NULL;
208211

209212
STATIC pyexec_result_t _exec_result = {0, MP_OBJ_NULL, 0};
210213

214+
#if CIRCUITPY_STATUS_BAR
211215
void supervisor_execution_status(void) {
212216
mp_obj_exception_t *exception = MP_OBJ_TO_PTR(_exec_result.exception);
213217
if (_current_executing_filename != NULL) {
@@ -220,6 +224,7 @@ void supervisor_execution_status(void) {
220224
serial_write_compressed(translate("Done"));
221225
}
222226
}
227+
#endif
223228

224229
#define STRING_LIST(...) {__VA_ARGS__, ""}
225230

@@ -245,13 +250,23 @@ STATIC bool maybe_run_list(const char *const *filenames) {
245250
}
246251
mp_hal_stdout_tx_str(_current_executing_filename);
247252
serial_write_compressed(translate(" output:\n"));
248-
supervisor_title_bar_update();
253+
254+
#if CIRCUITPY_STATUS_BAR
255+
supervisor_status_bar_update();
256+
#endif
257+
249258
pyexec_file(_current_executing_filename, &_exec_result);
259+
250260
#if CIRCUITPY_ATEXIT
251261
shared_module_atexit_execute(&_exec_result);
252262
#endif
263+
253264
_current_executing_filename = NULL;
254-
supervisor_title_bar_update();
265+
266+
#if CIRCUITPY_STATUS_BAR
267+
supervisor_status_bar_update();
268+
#endif
269+
255270
return true;
256271
}
257272

@@ -443,6 +458,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool first_run, bool *simulate_re
443458

444459
// Finished executing python code. Cleanup includes filesystem flush and a board reset.
445460
cleanup_after_vm(heap, _exec_result.exception);
461+
_exec_result.exception = NULL;
446462

447463
// If a new next code file was set, that is a reason to keep it (obviously). Stuff this into
448464
// the options because it can be treated like any other reason-for-stickiness bit. The
@@ -749,8 +765,10 @@ STATIC void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) {
749765

750766
if (ok_to_run) {
751767
#ifdef CIRCUITPY_BOOT_OUTPUT_FILE
752-
// Turn off title bar updates when writing out to boot_out.txt.
753-
supervisor_title_bar_suspend();
768+
#if CIRCUITPY_STATUS_BAR
769+
// Turn off status bar updates when writing out to boot_out.txt.
770+
supervisor_status_bar_suspend();
771+
#endif
754772
vstr_t boot_text;
755773
vstr_init(&boot_text, 512);
756774
boot_output = &boot_text;
@@ -778,7 +796,9 @@ STATIC void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) {
778796
FATFS *fs = &vfs->fatfs;
779797

780798
boot_output = NULL;
781-
supervisor_title_bar_resume();
799+
#if CIRCUITPY_STATUS_BAR
800+
supervisor_status_bar_resume();
801+
#endif
782802
bool write_boot_output = true;
783803
FIL boot_output_file;
784804
if (f_open(fs, &boot_output_file, CIRCUITPY_BOOT_OUTPUT_FILE, FA_READ) == FR_OK) {
@@ -822,6 +842,7 @@ STATIC void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) {
822842
port_post_boot_py(true);
823843

824844
cleanup_after_vm(heap, _exec_result.exception);
845+
_exec_result.exception = NULL;
825846

826847
port_post_boot_py(false);
827848

@@ -854,15 +875,23 @@ STATIC int run_repl(bool first_run) {
854875
status_led_deinit();
855876
#endif
856877
if (pyexec_mode_kind == PYEXEC_MODE_RAW_REPL) {
857-
supervisor_title_bar_suspend();
878+
#if CIRCUITPY_STATUS_BAR
879+
supervisor_status_bar_suspend();
880+
#endif
858881
exit_code = pyexec_raw_repl();
859-
supervisor_title_bar_resume();
882+
#if CIRCUITPY_STATUS_BAR
883+
supervisor_status_bar_resume();
884+
#endif
860885
} else {
861886
_current_executing_filename = "REPL";
862-
supervisor_title_bar_update();
887+
#if CIRCUITPY_STATUS_BAR
888+
supervisor_status_bar_update();
889+
#endif
863890
exit_code = pyexec_friendly_repl();
864891
_current_executing_filename = NULL;
865-
supervisor_title_bar_update();
892+
#if CIRCUITPY_STATUS_BAR
893+
supervisor_status_bar_update();
894+
#endif
866895
}
867896
#if CIRCUITPY_ATEXIT
868897
pyexec_result_t result;
@@ -910,6 +939,10 @@ int __attribute__((used)) main(void) {
910939

911940
stack_init();
912941

942+
#if CIRCUITPY_STATUS_BAR
943+
supervisor_status_bar_init();
944+
#endif
945+
913946
#if CIRCUITPY_BLEIO
914947
// Early init so that a reset press can cause BLE public advertising.
915948
supervisor_bluetooth_init();
@@ -959,7 +992,10 @@ int __attribute__((used)) main(void) {
959992
run_boot_py(safe_mode);
960993

961994
supervisor_workflow_start();
962-
supervisor_title_bar_start();
995+
996+
#if CIRCUITPY_STATUS_BAR
997+
supervisor_status_bar_request_update(true);
998+
#endif
963999

9641000
// Boot script is finished, so now go into REPL or run code.py.
9651001
int exit_code = PYEXEC_FORCED_EXIT;

ports/atmel-samd/boards/8086_commander/board.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,4 @@
2626

2727
#include "supervisor/board.h"
2828

29-
void board_init(void) {
30-
}
31-
32-
bool board_requests_safe_mode(void) {
33-
return false;
34-
}
35-
36-
void reset_board(void) {
37-
}
38-
39-
void board_deinit(void) {
40-
}
29+
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.

ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/board.c

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,5 @@
2525
*/
2626

2727
#include "supervisor/board.h"
28-
#include "common-hal/microcontroller/Pin.h"
29-
#include "supervisor/shared/board.h"
30-
#include "hal/include/hal_gpio.h"
3128

32-
void board_init(void) {
33-
}
34-
35-
bool board_requests_safe_mode(void) {
36-
return false;
37-
}
38-
39-
void reset_board(void) {
40-
}
41-
42-
void board_deinit(void) {
43-
}
29+
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.

ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/board.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,9 @@
2727
#include "supervisor/board.h"
2828
#include "common-hal/microcontroller/Pin.h"
2929
#include "supervisor/shared/board.h"
30-
#include "hal/include/hal_gpio.h"
31-
32-
void board_init(void) {
33-
}
34-
35-
bool board_requests_safe_mode(void) {
36-
return false;
37-
}
3830

3931
void reset_board(void) {
4032
board_reset_user_neopixels(&pin_PA15, 2);
4133
}
4234

43-
void board_deinit(void) {
44-
}
35+
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.

ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/board.c

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,5 @@
2525
*/
2626

2727
#include "supervisor/board.h"
28-
#include "common-hal/microcontroller/Pin.h"
29-
#include "supervisor/shared/board.h"
30-
#include "hal/include/hal_gpio.h"
3128

32-
void board_init(void) {
33-
}
34-
35-
bool board_requests_safe_mode(void) {
36-
return false;
37-
}
38-
39-
void reset_board(void) {
40-
}
41-
42-
void board_deinit(void) {
43-
}
29+
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.

ports/atmel-samd/boards/adafruit_slide_trinkey_m0/board.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,8 @@
2929
#include "supervisor/shared/board.h"
3030
#include "hal/include/hal_gpio.h"
3131

32-
void board_init(void) {
33-
}
34-
35-
bool board_requests_safe_mode(void) {
36-
return false;
37-
}
38-
3932
void reset_board(void) {
4033
board_reset_user_neopixels(&pin_PA04, 2);
4134
}
4235

43-
void board_deinit(void) {
44-
}
36+
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.

ports/atmel-samd/boards/aloriumtech_evo_m51/board.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,4 @@ void board_init(void) {
5050
}
5151
}
5252

53-
bool board_requests_safe_mode(void) {
54-
return false;
55-
}
56-
57-
void reset_board(void) {
58-
}
59-
60-
void board_deinit(void) {
61-
}
53+
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.

ports/atmel-samd/boards/arduino_mkr1300/board.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,5 @@
2525
*/
2626

2727
#include "supervisor/board.h"
28-
#include "mpconfigboard.h"
29-
#include "hal/include/hal_gpio.h"
3028

31-
void board_init(void) {
32-
}
33-
34-
bool board_requests_safe_mode(void) {
35-
return false;
36-
}
37-
38-
void reset_board(void) {
39-
}
40-
41-
void board_deinit(void) {
42-
}
29+
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.

0 commit comments

Comments
 (0)