Altering a JSON variable is failing for following snippet:
var data = {status: ''};
rosconnection.setOnOpen(function (e) {
data.status = 'Succeeded';
alert('success');
});
rosconnection.setOnError(function (e) {
data.status = 'Failed';
alert('fail');
});
data
stays empty, but the alert
gets called within rosconnection.setOnOpen
. The error is hard to replicate hence its used on a ros connection
, but i am 100% certain that it enters atleast one of the functions with success.