Skip to content

update to new syntax required: ESP8266SerialWifiBridge #137

@pizzadriver1

Description

@pizzadriver1

In the conditional expression
if (memcmp(configMsg, CONFIG_MSG_START, min(strlen(CONFIG_MSG_START), configMsgLen)) != 0 ) { configMsgLen = 0; // discard all we have got so far }
there is an issue, which prevents the .ino file from beeing compiled: The definition of min(..., ...) has obviously changed in the meantime. It needs the type to be compared ( min(..., ...) ). Changing it to
if (memcmp(configMsg, CONFIG_MSG_START, min<uint8_t>(strlen(CONFIG_MSG_START), configMsgLen)) != 0 ) { configMsgLen = 0; // discard all we have got so far }
solves the problem for me. uint8_t is the type of configMsgLen as given by the error message. Can anybody please doublecheck if unint8_t is the right type for strlen(CONFIG_MSG_START) as well?

Best,
pizzadriver1

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