esp32: Add missing network.STAT_CONNECT_FAIL constant.

The esp32 port had network.STAT_ASSOC_FAIL for the same purpose,
but this is undocumented and different to all other ports. That
constant is now deprecated.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
This commit is contained in:
Angus Gratton
2024-11-20 14:32:25 +11:00
committed by Damien George
parent 6dd976cc5c
commit beabef5aac

View File

@@ -82,5 +82,9 @@
#endif
{ MP_ROM_QSTR(MP_QSTR_STAT_WRONG_PASSWORD), MP_ROM_INT(WIFI_REASON_AUTH_FAIL)},
{ MP_ROM_QSTR(MP_QSTR_STAT_BEACON_TIMEOUT), MP_ROM_INT(WIFI_REASON_BEACON_TIMEOUT)},
#if !MICROPY_PREVIEW_VERSION_2
// Deprecated, use STAT_CONNECT_FAIL same as other ports
{ MP_ROM_QSTR(MP_QSTR_STAT_ASSOC_FAIL), MP_ROM_INT(WIFI_REASON_ASSOC_FAIL)},
#endif
{ MP_ROM_QSTR(MP_QSTR_STAT_CONNECT_FAIL), MP_ROM_INT(WIFI_REASON_ASSOC_FAIL)},
{ MP_ROM_QSTR(MP_QSTR_STAT_HANDSHAKE_TIMEOUT), MP_ROM_INT(WIFI_REASON_HANDSHAKE_TIMEOUT)},