Skip to content

Commit 90f284c

Browse files
author
mullender
committed
fix(webcfg): allow ST25R3916 in captive portal
1 parent e7d121f commit 90f284c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

main/WebServerManager.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1703,7 +1703,8 @@ esp_err_t WebServerManager::handleSaveCaptivePortalConfig(httpd_req_t *req) {
17031703
}
17041704

17051705
cJSON *nfcReaderTypeItem = cJSON_GetObjectItem(obj, "nfcReaderType");
1706-
if (nfcReaderTypeItem && cJSON_IsNumber(nfcReaderTypeItem) && (nfcReaderTypeItem->valueint < 0 || nfcReaderTypeItem->valueint > 1)) {
1706+
// 0 = PN532 (SPI), 1 = PN7160, 2 = ST25R3916 (I2C).
1707+
if (nfcReaderTypeItem && cJSON_IsNumber(nfcReaderTypeItem) && (nfcReaderTypeItem->valueint < 0 || nfcReaderTypeItem->valueint > 2)) {
17071708
cJSON_Delete(obj);
17081709
httpd_resp_set_status(req, "400 Bad Request");
17091710
httpd_resp_set_type(req, "application/json");

0 commit comments

Comments
 (0)