Skip to content

serial readUntil not working as expected #480

@martinwork

Description

@martinwork

With the code

    while (1) {
        ManagedString in = uBit.serial.readUntil(":");
        ManagedString out = "|" + in + "#\n";
        uBit.serial.send(out);
        uBit.sleep(100);
    }

sending ab:cd:ef:, V2 works as expected, returning

|ab#
|cd#
|ef#

but V1 returns

|ab:c#
|#
|ef#

Sample source and hex files
serial-readuntil.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions