Does anyone know why this code does not work? I wanna compare the current alert with the last sent alert, avoiding that the same alert to be sent multiple times.
Code: Select all
void sendAlert(char alertMessage[100]){
static WiFiAlert t;
static char lastAlertSent[100];
t.SetDelay(0);
if(strcmp(alertMessage,lastAlertSent)!=0) t.Send(alertMessage, true);
strcpy(lastAlertSent,alertMessage);
}