WLED/wled00/wled07_notify.ino
cschwinne acfdb4ab75 improved structure
program split up  in 10 subfiles
2016-11-19 19:39:17 +01:00

32 lines
626 B
C++

void notify(int callMode)
{
switch (callMode)
{
case 1: if (!notifyDirect) return; break;
case 2: if (!notifyButton) return; break;
case 3: if (!notifyForward) return; break;
default: return;
}
String snd = "/ajax_in&N=1&A=";
snd = snd + bri;
snd = snd + "&R=";
snd = snd + col[0];
snd = snd + "&G=";
snd = snd + col[1];
snd = snd + "&B=";
snd = snd + col[2];
HTTPClient hclient;
for (int i = 0; i < notifier_ips_count; i++)
{
String url = "http://";
url = url + notifier_ips[i];
url = url + snd;
hclient.begin(url);
hclient.GET();
hclient.end();
}
}