Note: This is with AM 4.1 BETA 12 and the new plugin 3.7 BETA 1.
I can create a new IIC variable with si_variable_create.
Code: Select all
variable = "gci/axis/throttle1"
type = "DOUBLE"
initial = -1.0
var_id = si_variable_create(variable, type, initial)
I can subscribe to the same variable, same type.
Code: Select all
function new_data_callback(data1)
log("New data: " .. data1)
end
si_variable_subscribe("gci/axis/throttle1", "DOUBLE", new_data_callback)
But when i write to the var_id retrieved from my data structure, e.g.
Code: Select all
value = 0.5
si_variable_write(var_id, value)
I have already compared the var_id created and the var_id used. They are the same when logged. E.g. 'userdata: 000001F41C127870'
I'm stuck. I can't see what I am doing wrong. Is that the correct procedure to work with IIC?
Paul