diff --git a/docs/scripts/docstring_translation_plugin.py b/docs/scripts/docstring_translation_plugin.py index 0013306..49b9eb4 100644 --- a/docs/scripts/docstring_translation_plugin.py +++ b/docs/scripts/docstring_translation_plugin.py @@ -27,7 +27,7 @@ def on_instance(self, node: ast.AST | ObjectNode, obj: Object) -> None: def add_members(m: Object, all_members: List): - if not m.is_alias and not m.is_attribute: + if not m.is_alias: all_members.append(m) for c in m.members.values(): add_members(c, all_members) diff --git a/docs/scripts/docstrings_nl.txt b/docs/scripts/docstrings_nl.txt index d4797f1..7f6176f 100644 --- a/docs/scripts/docstrings_nl.txt +++ b/docs/scripts/docstrings_nl.txt @@ -352,11 +352,656 @@ Lists all characteristics in the micro:bit GATT profile See Also: https://lancaster-university.github.io/microbit-docs/resources/bluetooth/bluetooth_profile.html """ -Lists all characteristics in the micro:bit GATT profile +Geeft een overzicht van alle characteristics in het micro:bit GATT-profiel Zie ook: https://lancaster-university.github.io/microbit-docs/resources/bluetooth/bluetooth_profile.html """ +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.DEVICE_NAME +""" +Read Mandatory + +Write Mandatory + +Fields + +1. Name : utf8s +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.APPEARANCE +""" +The external appearance of this device. The values are composed of a category (10-bits) and sub-categories (6-bits). + +Read Mandatory + +Fields + +1. Category : 16bit +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.PERIPHERAL_PREFERRED_CONNECTION_PARAMETERS +""" +Read Mandatory + +Fields + +1. Minimum Connection Interval : uint16 +2. Maximum Connection Interval : uint16 +3. Slave Latency : uint16 +4. Connection Supervision Timeout Multiplier : uint16 +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.SERVICE_CHANGED +""" +Indicate Mandatory + +Fields + +1. Start of Affected Attribute Handle Range : uint16 +2. End of Affected Attribute Handle Range : uint16 + +Descriptors + +1. Client Characteristic Configuration : 2902 +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.MODEL_NUMBER_STRING +""" +The value of this characteristic is a UTF-8 string representing the model number assigned by the device vendor. + +Read Mandatory + +Fields + +1. Model Number : utf8s +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.SERIAL_NUMBER_STRING +""" +The value of this characteristic is a variable-length UTF-8 string representing the serial number for a particular +instance of the device. + +Read Mandatory + +Fields + +1. Serial Number : utf8s +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.HARDWARE_REVISION_STRING +""" +The value of this characteristic is a UTF-8 string representing the hardware revision for the hardware within +the device. + +Read Mandatory + +Fields + +1. Hardware Revision : utf8s +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.FIRMWARE_REVISION_STRING +""" +The value of this characteristic is a UTF-8 string representing the firmware revision for the firmware within +the device. + +Read Mandatory + +Fields + +1. Firmware Revision : utf8s +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.MANUFACTURER_NAME_STRING +""" +The value of this characteristic is a UTF-8 string representing the name of the manufacturer of the device. + +Read Mandatory + +Fields + +1. Manufacturer Name : utf8s +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.ACCELEROMETER_DATA +""" +Contains accelerometer measurements for X, Y and Z axes as 3 signed 16 bit values in that order and in little +endian format. X, Y and Z values should be divided by 1000. + +Read Mandatory + +Notify Mandatory + +Fields + +1. Accelerometer_X : sint16 +2. Accelerometer_Y : sint16 +3. Accelerometer_Z : sint16 + +Descriptors + +1. Client Characteristic Configuration : 2902 +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.ACCELEROMETER_PERIOD +""" +Determines the frequency with which accelerometer data is reported in milliseconds. +Valid values are 1, 2, 5, 10, 20, 80, 160 and 640. + +Read Mandatory + +Write Mandatory + +Fields + +1. Accelerometer_Period : uint16 +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.MAGNETOMETER_DATA +""" +Contains magnetometer measurements for X, Y and Z axes as 3 signed 16 bit values in that order and in little endian +format. Data can be read on demand or notified periodically. + +Read Mandatory + +Notify Mandatory + +Fields + +1. Magnetometer_X : sint16 +2. Magnetometer_Y : sint16 +3. Magnetometer_Z : sint16 + +Descriptors + +1. Client Characteristic Configuration : 2902 +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.MAGNETOMETER_PERIOD +""" +Determines the frequency with which magnetometer data is reported in milliseconds. +Valid values are 1, 2, 5, 10, 20, 80, 160 and 640. + +Read Mandatory + +Write Mandatory + +Fields + +1. Magnetometer_Period : uint16 +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.MAGNETOMETER_BEARING +""" +Compass bearing in degrees from North. + +Read Mandatory + +Notify Mandatory + +Fields + +1. bearing value : uint16 + +Descriptors + +1. Client Characteristic Configuration : 2902 +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.MAGNETOMETER_CALIBRATION +""" +Write Mandatory + +Notify Mandatory + +Fields + +1. calibration field : uint8 + + + 0 - state unknown + 1 - calibration requested + 2 - calibration completed OK + 3 - calibration completed with error + +Descriptors + +1. Client Characteristic Configuration : 2902 +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.BUTTON_A +""" +State of Button A may be read on demand by a connected client or the client may subscribe to notifications of +state change. 3 button states are defined and represented by a simple numeric enumeration: + + 0 = not pressed + 1 = pressed + 2 = long press. + +Read Mandatory + +Notify Mandatory + +Fields + +1. Button_State_Value : uint8 + +Descriptors + +1. Client Characteristic Configuration : 2902 +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.BUTTON_B +""" +State of Button B may be read on demand by a connected client or the client may subscribe to notifications of +state change. 3 button states are defined and represented by a simple numeric enumeration: + + 0 = not pressed + 1 = pressed + 2 = long press. + +Read Mandatory + +Notify Mandatory + +Fields + +1. Button_State_Value : uint8 + +Descriptors + +1. Client Characteristic Configuration : 2902 +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.PIN_DATA +""" +Contains data relating to zero or more pins. Structured as a variable length array of up to +19 Pin Number / Value pairs. + +Pin Number and Value are each uint8 fields. +Note however that the micro:bit has a 10 bit ADC and so values are compressed to 8 bits with a loss of resolution. + +OPERATIONS: + +WRITE: Clients may write values to one or more pins in a single GATT write operation. +A pin to which a value is to be written must have been configured for output using the Pin IO Configuration +characteristic. Any attempt to write to a pin which is configured for input will be ignored. + +NOTIFY: Notifications will deliver Pin Number / Value pairs for those pins defined as input pins by the Pin IO +Configuration characteristic and whose value when read differs from the last read of the pin. + +READ: A client reading this characteristic will receive Pin Number / Value pairs for all those pins defined as +input pins by the Pin IO Configuration characteristic. + +Read Mandatory + +Write Mandatory + +Notify Mandatory + +Fields + +1. IO_Pin_Data : uint8[] + +Descriptors + +1. Client Characteristic Configuration : 2902 +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.PIN_AD_CONFIGURATION +""" +A bit mask which allows each pin to be configured for analogue or digital use. + +Bit n corresponds to pin n where 0 LESS THAN OR EQUAL TO n LESS THAN 19. +A value of 0 means digital and 1 means analogue. + +Read Mandatory + +Write Mandatory + +Fields + +1. Pin_AD_Config_Value : uint32 +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.PIN_IO_CONFIGURATION +""" +A bit mask (32 bit) which defines which inputs will be read. If the Pin AD Configuration bit mask is also set the +pin will be read as an analogue input, if not it will be read as a digital input. + +Note that in practice, setting a pin's mask bit means that it will be read by the micro:bit runtime and, if +notifications have been enabled on the Pin Data characteristic, data read will be transmitted to the connected +Bluetooth peer device in a Pin Data notification. If the pin's bit is clear, it simply means that it will not be +read by the micro:bit runtime. + +Bit n corresponds to pin n where 0 LESS THAN OR EQUAL TO n LESS THAN 19. A value of 0 means configured for output +and 1 means configured for input. + +Read Mandatory + +Write Mandatory + +Fields + +1. Pin_IO_Config_Value : uint32 +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.PWM_CONTROL +""" +A variable length array 1 to 2 instances of : + + struct PwmControlData { + uint8_t pin; + uint16_t value; + uint32_t period; + } + +Period is in microseconds and is an unsigned int but transmitted. +Value is in the range 0 – 1024, per the current DAL API (e.g. setAnalogValue). 0 means OFF. + +Fields are transmitted over the air in Little Endian format. + + +Write Mandatory + +Fields + +1. PWM Control Field : uint8[] +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.LED_MATRIX_STATE +""" +Allows the state of any|all LEDs in the 5x5 grid to be set to on or off with a single GATT operation. +Consists of an array of 5 x utf8 octets, each representing one row of 5 LEDs. +Octet 0 represents the first row of LEDs i.e. the top row when the micro:bit is viewed with the edge connector at +the bottom and USB connector at the top. +Octet 1 represents the second row and so on. +In each octet, bit 4 corresponds to the first LED in the row, bit 3 the second and so on. +Bit values represent the state of the related LED: off (0) or on (1). + +So we have: + + Octet 0, LED Row 1: bit4 bit3 bit2 bit1 bit0 + Octet 1, LED Row 2: bit4 bit3 bit2 bit1 bit0 + Octet 2, LED Row 3: bit4 bit3 bit2 bit1 bit0 + Octet 3, LED Row 4: bit4 bit3 bit2 bit1 bit0 + Octet 4, LED Row 5: bit4 bit3 bit2 bit1 bit0 + + +Read Mandatory + +Write Mandatory + +Fields + +1. LED_Matrix_State : uint8[] +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.LED_TEXT +""" +A short UTF-8 string to be shown on the LED display. Maximum length 20 octets. + +Write Mandatory + +Fields + +1. LED_Text_Value : utf8s +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.SCROLLING_DELAY +""" +Specifies a millisecond delay to wait for in between showing each character on the display. + +Read Mandatory + +Write Mandatory + +Fields + +1. Scrolling_Delay_Value : uint16 +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.MICROBIT_REQUIREMENTS +""" +A variable length list of event data structures which indicates the types of client event, potentially with a +specific value which the micro:bit wishes to be informed of when they occur. The client should read this +characteristic when it first connects to the micro:bit. It may also subscribe to notifications +to that it can be informed if the value of this characteristic is changed by the micro:bit firmware. + + struct event { + uint16 event_type; + uint16 event_value; + }; + +Note that an event_type of zero means ANY event type and an event_value part set to zero means ANY event value. + +event_type and event_value are each encoded in little endian format. + +Read Mandatory + +Notify Mandatory + +Fields + +1. microbit_reqs_value : uint8[] + +Descriptors + +1. Client Characteristic Configuration : 2902 +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.MICROBIT_EVENT +""" +Contains one or more event structures which should be notified to the client. It supports notifications and as +such the client should subscribe to notifications from this characteristic. + + struct event { + uint16 event_type; + uint16 event_value; + }; + + +Read Mandatory + +Notify Mandatory + +Fields + +1. Event_Type_And_Value : uint8[] + +Descriptors + +1. Client Characteristic Configuration : 2902 +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.CLIENT_REQUIREMENTS +""" +a variable length list of event data structures which indicates the types of micro:bit event, potentially with a +specific value which the client wishes to be informed of when they occur. The client should write to this +characteristic when it first connects to the micro:bit. + + struct event { + uint16 event_type; + uint16 event_value; + }; + + +Note that an event_type of zero means ANY event type and an event_value part set to zero means ANY event value. + +event_type and event_value are each encoded in little endian format. + +Write Mandatory + +Fields + +1. Client_Requirements_Value : uint8[] +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.CLIENT_EVENT +""" +a writable characteristic which the client may write one or more event structures to, to inform the micro:bit of +events which have occurred on the client. These should be of types indicated in the micro:bit Requirements +characteristic bit mask. + + struct event { + uint16 event_type; + uint16 event_value; + }; + +Write Mandatory + +Write Without Response Mandatory + +Fields + +1. Event_Types_And_Values : uint8[] +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.DFU_CONTROL +""" +Writing 0x01 initiates rebooting the micro:bit into the Nordic Semiconductor bootloader if the DFU Flash Code +characteristic has been written to with the correct secret key. + +Writing 0x02 to this characteristic means "request flash code". + +Read Mandatory + +Write Mandatory + +Fields + +1. dfu_control : uint8 +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.TEMPERATURE +""" +Signed integer 8 bit value in degrees celsius. + +Read Mandatory + +Notify Mandatory + +Fields + +1. temperature value : sint8 + +Descriptors + +1. Client Characteristic Configuration : 2902 +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.TEMPERATURE_PERIOD +""" +Determines the frequency with which temperature data is updated in milliseconds. + +Read Mandatory + +Write Mandatory + +Fields + +1. temperature period value : uint16 +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.TX_CHARACTERISTIC +""" +This characteristic allows the micro:bit to transmit a byte array containing an arbitrary number of arbitrary +octet values to a connected device. + +The maximum number of bytes which may be transmitted in one PDU is limited to the MTU minus three or 20 octets +to be precise. + +Indicate Mandatory + +Fields + +1. UART TX Field : uint8[] +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.RX_CHARACTERISTIC +""" +This characteristic allows a connected client to send a byte array containing an arbitrary number of arbitrary +octet values to a connected micro:bit. + +The maximum number of bytes which may be transmitted in one PDU is limited to the MTU minus three or 20 octets +to be precise. + + +Write Mandatory + +Write Without Response Mandatory + +Fields + +1. UART TX Field : uint8[] +""" + +""" + FUNCTION kaspersmicrobit.bluetoothprofile.characteristics.Characteristic.lookup """ Looks up the enum corresponding the given uuid @@ -376,11 +1021,137 @@ Lists all services that could be offered by the micro:bit See Also: https://lancaster-university.github.io/microbit-docs/resources/bluetooth/bluetooth_profile.html """ -Lists all services that could be offered by the micro:bit +Geeft een overzicht van alle services die door de micro:bit kunnen worden aangeboden Zie ook: https://lancaster-university.github.io/microbit-docs/resources/bluetooth/bluetooth_profile.html """ +ATTRIBUTE kaspersmicrobit.bluetoothprofile.services.Service.GENERIC_ACCESS +""" +The generic_access service contains generic information about the device. +All available Characteristics are readonly. +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.services.Service.GENERIC_ATTRIBUTE +""" + +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.services.Service.DEVICE_INFORMATION +""" +The Device Information Service exposes manufacturer and/or vendor information about a device. + +This service exposes manufacturer information about a device. +The Device Information Service is instantiated as a Primary Service. +Only one instance of the Device Information Service is exposed on a device. +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.services.Service.ACCELEROMETER +""" +Exposes accelerometer data. An accelerometer is an electromechanical device that will measure acceleration forces. +These forces may be static, like the constant force of gravity pulling at your feet, or they could be dynamic +- caused by moving or vibrating the accelerometer. + +Value contains fields which represent 3 separate accelerometer measurements for X, Y and Z axes +as 3 unsigned 16 bit values in that order and in little endian format. + +Data can be read on demand or notified periodically. +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.services.Service.MAGNETOMETER +""" +Exposes magnetometer data. A magnetometer measures a magnetic field such as the earth's magnetic field in 3 axes. +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.services.Service.BUTTON +""" +Exposes the two Micro Bit buttons and allows 'commands' associated with button state changes to be associated +with button states and notified to a connected client. +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.services.Service.IO_PIN +""" +Provides read/write access to I/O pins, individually or collectively. Allows configuration of each pin for +input/output and analogue/digital use. +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.services.Service.LED +""" +Provides access to and control of LED state. +Allows the state (ON or OFF) of all 25 LEDs to be set in a single write operation. +Allows short text strings to be sent by a client for display on the LED matrix and scrolled across at a speed +controlled by the Scrolling Delay characteristic. +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.services.Service.EVENT +""" +A generic, bi-directional event communication service. + +The Event Service allows events or commands to be notified to the micro:bit by a connected client and it allows +micro:bit to notify the connected client of events or commands originating from with the micro:bit. The micro:bit +can inform the client of the types of event it is interested in being informed about (e.g. an incoming call) and +the client can inform the micro:bit of types of event it wants to be notified about. + +The term "event" will be used here for both event and command types of data. + +Events may have an associated value. + +Note that specific event ID values including any special values such as those which may represent wild cards are +not defined here. The micro:bit run time documentation should be consulted for this information. + +Multiple events of different types may be notified to the client or micro:bit at the same time. +Event data is encoded as an array of structs each encoding an event of a given type together with an associated +value. Event Type and Event Value are both defined as uint16 and therefore the length of this array will always be +a multiple of 4. + + struct event { + uint16 event_type; + uint16 event_value; + }; +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.services.Service.DFU_CONTROL +""" +Allows clients to initiate the micro:bit pairing and over the air firmware update procedures. +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.services.Service.TEMPERATURE +""" +Ambient temperature derived from several internal temperature sensors on the micro:bit +""" + +""" + +ATTRIBUTE kaspersmicrobit.bluetoothprofile.services.Service.UART +""" +This is an implementation of Nordic Semiconductor's UART/Serial Port Emulation over Bluetooth low energy. + +See https://developer.nordicsemi.com/nRF5_SDK/nRF51_SDK_v8.x.x/doc/8.0.0/s110/html/a00072.html for the original +Nordic Semiconductor documentation by way of background. +""" + +""" + FUNCTION kaspersmicrobit.bluetoothprofile.services.Service.lookup """ Looks up the enum corresponding the given uuid @@ -394,6 +1165,23 @@ Returns (Service): The enum with the given uuid, None if not found. """ +ATTRIBUTE kaspersmicrobit.services.accelerometer.AccelerometerPeriod +""" +The interval at which the Accelerometer is read is an integer and expresses the number of milliseconds. +There is a limited number of valid periods: 1, 2, 5, 10, 20, 80, 160, 640 + +Warning: + These are the valid values according to the specification, but it seems that this does not work as I expect + TODO to investigate +""" +Het interval waarmee de accelerometer wordt uitgelezen is een geheel getal en drukt het aantal milliseconden uit. +Er is een beperkt aantal geldige periodes: 1, 2, 5, 10, 20, 80, 160, 640 + +Waarschuwing: + Dit zijn de geldige waarden volgens de specificatie, maar het lijkt erop dat dit niet werkt zoals ik verwacht + TODO om te onderzoeken +""" + CLASS kaspersmicrobit.services.accelerometer.AccelerometerData """ The values of the 3 axes of an accelerometer measurement, in milli-g. (with g the gravitational acceleration on Earth) @@ -639,6 +1427,13 @@ Raises: accelerometer periode te lezen (komt normaal gezien niet voor) """ +ATTRIBUTE kaspersmicrobit.services.buttons.ButtonCallback +""" +A function with 1 argument (te button "A" or "B") +""" +Een functie met 1 argument (de knop "A" of "B") +""" + CLASS kaspersmicrobit.services.buttons.ButtonState """ All possible states of a button: @@ -1250,6 +2045,20 @@ The analog-digital configuration of a pin De analoog-digitaal configuratie van een pin """ +ATTRIBUTE kaspersmicrobit.services.io_pin.PinAD.DIGITAL +""" +Indicates that a pin is used for a digital signal +""" +Geeft aan dat een pin wordt gebruikt voor een digitaal signaal +""" + +ATTRIBUTE kaspersmicrobit.services.io_pin.PinAD.ANALOG +""" +Indicates that a pin is used for an analog signal +""" +Geeft aan dat een pin wordt gebruikt voor een analoog signaal +""" + CLASS kaspersmicrobit.services.io_pin.PinIO """ The input-output configuration of a pin @@ -1257,6 +2066,20 @@ The input-output configuration of a pin De input-output configuratie van een pin """ +ATTRIBUTE kaspersmicrobit.services.io_pin.PinIO.OUTPUT +""" +Indicates that a pin is being used to read from +""" +Geeft aan dat een pin wordt gebruikt om uit te lezen +""" + +ATTRIBUTE kaspersmicrobit.services.io_pin.PinIO.INPUT +""" +Indicates that a pin is being used to write to +""" +Geeft aan dat een pin wordt gebruikt om naar te schrijven +""" + CLASS kaspersmicrobit.services.io_pin.PinIOConfiguration """ The IO pin configuration. Contains for each pin whether it is used for INPUT or OUTPUT @@ -1803,6 +2626,23 @@ Raises: ValueError: Indien de gegeven string niet exact 25 on/off waarden bevat """ +ATTRIBUTE kaspersmicrobit.services.magnetometer.MagnetometerPeriod +""" +The interval at which the Magnetometer is read is an integer and expresses the number of milliseconds. +There is a limited number of valid periods: 1, 2, 5, 10, 20, 80, 160, 640 + +Warning: + These are the valid values according to the specification, but it seems that this does not work as I expect + TODO to investigate +""" +Het interval waarmee de magnetometer wordt uitgelezen, dit is een geheel getal en drukt het aantal milliseconden uit. +Er is een beperkt aantal geldige periodes: 1, 2, 5, 10, 20, 80, 160, 640 + +Waarschuwing: + Dit zijn de geldige waarden volgens de specificatie, maar het lijkt erop dat dit niet werkt zoals ik verwacht + TODO om te onderzoeken +""" + CLASS kaspersmicrobit.services.magnetometer.Calibration """ A class that allows you to follow up on a calibration diff --git a/src/kaspersmicrobit/services/buttons.py b/src/kaspersmicrobit/services/buttons.py index b4be3cc..2592034 100644 --- a/src/kaspersmicrobit/services/buttons.py +++ b/src/kaspersmicrobit/services/buttons.py @@ -9,7 +9,7 @@ ButtonCallback = Callable[[str], None] """ -Een functie met 1 argument (de knop "A" of "B") +A function with 1 argument (te button "A" or "B") """