micropython / micropython-lib

Core Python libraries ported to MicroPython
Other
2.42k stars 1k forks source link

Undefined function in CBOR library #648

Open Tangerino opened 1 year ago

Tangerino commented 1 year ago

In CBOR library there are a couple of unidentified functions such as:

unpack_float16

def decode_float16(decoder):
    payload = decoder.read(2)
    return unpack_float16(payload)

and

undefined

special_decoders = {
    20: lambda self: False,
    21: lambda self: True,
    22: lambda self: None,
    23: lambda self: undefined,
    24: decode_simple_value,
    25: decode_float16,
    26: decode_float32,
    27: decode_float64,
    31: lambda self: break_marker,
}
jimmo commented 1 year ago

@iabdalkader hi Ibrahim, would you be able to take a look at this? Thanks

iabdalkader commented 1 year ago

It seems it was not implemented in the original library, I have no idea why, but it should be easy to add.

jonnor commented 2 months ago

Anyone want to make a MR for this functionality? :)