devi fare questa modifica:
Open this file inside a text editor (notepad works fine)
C:\Users\Giacomo\Documents\Arduino\libraries\ReefA ngel_Wifi\ReefAngel_Wifi.cpp
Locate the following block of code (starts on line 265):
case REQ_M_BYTE:
case REQ_M_INT:
{
// webmemoryloc is location
// weboption is value
if ( bHasSecondValue && (webmemoryloc >= 0) )
{
// if we have a second value, we write the value to memory
if ( reqtype == REQ_M_BYTE )
InternalMemory.write(webmemoryloc, weboption);
else
InternalMemory.write_int(webmemoryloc, weboption);
#ifdef WavemakerSetup // ADD THIS LINE
if ( (webmemoryloc == Mem_I_WM1Timer) || (webmemoryloc == Mem_I_WM2Timer) )
{
// Restart wavemaker timers once they are set
byte i = 1;
byte p = ReefAngel.WM1Port;
if ( webmemoryloc == Mem_I_WM2Timer )
{
i = 2;
p = ReefAngel.WM2Port;
}
ReefAngel.Timer[i].Trigger = 0;
ReefAngel.Timer[i].SetInterval(weboption);
ReefAngel.Timer[i].Start();
ReefAngel.Relay.On(p);
}
#endif // WavemakerSetup // ADD THIS LINE
Serial.print("<M>OK</M>");
}
Add in the 2 lines that have // ADD THIS LINE in them. Those lines are
#ifdef WavemakerSetup
#endif // WavemakerSetup
|