RPCVariable

20 May 2011

Good afternoon,

does setting a variable over RPC set it to 0 first? or reassign it.

I'm setting a variable via http and it is triggering an event when one is bigger than the other even if i set it so it shouldn't

for example

if (iPIR>pir_sense){
    catDetect++;
}

if i change pir_sense to anything even a buge number it increases the catdetect var

20 May 2011

I also seem to freeze the mbed comms over tcp after trying to write to a variable, i need to reset it everytime

20 May 2011

A little bit more debugging and it seems to be disabling the RPCVariable after i call the URL via ajax/jquery.

If I do it manually it works fine.

if I modify the code to just output the url and copy and paste it, it works fine.

I'm confused

20 May 2011

Fixed it, nevermind.

it was the url, worked fine in the browser but it need the '%20' to add the space for the '/write 123' bit so the url is now

'urltombed/rpc/rpcvaltoedit/write%20val'

thanks for reading