Add trace message

pull/123/head
Hieromon Ikasamo 6 years ago
parent 5bceb68960
commit af2d505dde
  1. 4
      examples/Credential/Credential.ino

@ -123,13 +123,15 @@ String delCredential(PageArgument& args) {
AutoConnectCredential ac(CREDENTIAL_OFFSET); AutoConnectCredential ac(CREDENTIAL_OFFSET);
if (args.hasArg("num")) { if (args.hasArg("num")) {
int8_t e = args.arg("num").toInt(); int8_t e = args.arg("num").toInt();
Serial.printf("Request deletion #%d\n", e);
if (e > 0) { if (e > 0) {
struct station_config entry; struct station_config entry;
// If the input number is valid, delete that entry. // If the input number is valid, delete that entry.
int8_t de = ac.load(e - 1, &entry); // A base of entry num is 0. int8_t de = ac.load(e - 1, &entry); // A base of entry num is 0.
if (de > 0) { if (de > 0) {
ac.del((char *)entry.ssid); Serial.printf("Delete for %s ", (char *)entry.ssid);
Serial.printf("%s\n", ac.del((char *)entry.ssid) ? "completed" : "failed");
// Returns the redirect response. The page is reloaded and its contents // Returns the redirect response. The page is reloaded and its contents
// are updated to the state after deletion. It returns 302 response // are updated to the state after deletion. It returns 302 response

Loading…
Cancel
Save