Hi,
how can I manage the non-passage of a data / value from URL?
code:
void ethernetForMountaineerEth_NetworkUp(GTM.Module.NetworkModule sender,
GTM.Module.NetworkModule.NetworkState state)
{
var ledEvent = WebServer.SetupWebEvent("Shift_Register");
ledEvent.WebEventReceived += new WebEvent.ReceivedWebEventHandler(ledEvent_WebEventReceived);
WebServer.StartLocalServer(ethernetForMountaineerEth.NetworkSettings.IPAddress, 80);
}
void ledEvent_WebEventReceived(string path, WebServer.HttpMethod method, Responder responder)
{
string ins_dato = responder.GetParameterValueFromURL("ins_num_dati").ToLower();
int valore = Int32.Parse(ins_dato);
Debug.Print("Ins Dato: "+ins_dato);
if (ins_dato != null) // -----------------------------does not find anything
{
while (valore != 0)
{
Rclk.Write(false);
Thread.Sleep(1);
Rclk.Write(true);
a += 1;
impulso();
valore -= 1;
Double part = Partition.ReadVoltage();
Debug.Print("Tesione del partitore: " + part.ToString("N2") + " Volt");
Debug.Print("Dato inserito ON");
responder.Respond("Dati Inseriti nello Shift Register " + ins_dato + " \n\nTesione del partitore: " + part.ToString("N2") + " Volt");
}
Mainboard.SetDebugLED(true);
responder.Respond(" 0 dati inseriti\n\n led blue acceso");
}
else
{
responder.Respond("Inserisci almeno un dato.....");
}
}