Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pybricks/messaging/pb_type_ble_radio.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,12 @@ static mp_obj_t pb_type_ble_radio_make_new(const mp_obj_type_t *type, size_t n_a
#if PYBRICKS_PY_MESSAGING_BLE_RADIO_OLD
mp_obj_t pb_type_BLE_new(mp_obj_t broadcast_channel_in, mp_obj_t observe_channels_in) {
if (broadcast_channel_in != mp_const_none || observe_channels_in != MP_OBJ_FROM_PTR(&mp_const_empty_tuple_obj)) {
#if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_NONE
// Hubs that drop exception messages to save flash get a short hint too.
mp_print_str(&mp_plat_print, "Moved to pybricks.messaging.BLERadio.\n");
#else
mp_printf(&mp_plat_print, "Hub messaging has been moved. You should use:\n\nfrom pybricks.messaging import BLERadio\nradio = BLERadio(broadcast_channel, observe_channels)\n\n");
#endif
return pb_type_ble_radio_init(broadcast_channel_in, observe_channels_in);
}
return mp_const_none;
Expand Down