From 64620ca43fab27e4590507830872a92cb850a4ef Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Sat, 12 Dec 2020 14:47:34 +0100 Subject: [PATCH] pybricks.pupdevices.UltrasonicSensor: remove power hack Sensors that require power are now automatically powered when plugged in, so we no longer need this hack at the module level. --- pybricks/pupdevices/pb_type_pupdevices_ultrasonicsensor.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/pybricks/pupdevices/pb_type_pupdevices_ultrasonicsensor.c b/pybricks/pupdevices/pb_type_pupdevices_ultrasonicsensor.c index 5018cb3ab..1d7048570 100644 --- a/pybricks/pupdevices/pb_type_pupdevices_ultrasonicsensor.c +++ b/pybricks/pupdevices/pb_type_pupdevices_ultrasonicsensor.c @@ -33,9 +33,6 @@ STATIC mp_obj_t pupdevices_UltrasonicSensor_make_new(const mp_obj_type_t *type, // Get iodevices self->pbdev = pb_device_get_device(port, PBIO_IODEV_TYPE_ID_SPIKE_ULTRASONIC_SENSOR); - // This sensor requires power, which iodevice does not do automatically yet - pb_device_set_power_supply(self->pbdev, 100); - // Create an instance of the LightArray class self->lights = common_LightArray_obj_make_new(self->pbdev, PBIO_IODEV_MODE_PUP_ULTRASONIC_SENSOR__LIGHT, 4);