Skip to content

Data type error in WiFiClass::wiFiModemInit(bool _status) #13

@Phonog

Description

@Phonog

In the said function, there is:
sprintf(_dataBuffer, "AT+CWINIT=%d\r\n", _status);

The problem is that the parameter to the AT command must be 0 or 1, whereas this code passes the value of the boolean parameter, whatever its numeric value. I suggest the following change:
sprintf(_dataBuffer, "AT+CWINIT=%d\r\n", _status ? 1 : 0 ) ;

Regards,
JMD

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