You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In function AsebaSendChangedVariables in aseba/transport/buffer/vm-buffer.c, about the test vm->variablesOld && idx <= vm->variablesSize in the for loop: vm->variablesOld is probably defined (non-NULL) in all Mobsya uses, including in aseba-target-thymio2 (definition of vmState in file skel-usb.c). But if the purpose of vm->variablesOld && is to handle cases where variablesOld doesn't exist, i.e. vm->variablesOld is NULL, then:
No need to test it for every loop iteration, it would be better to do it once with an if
No message will be sent at all, clients like Aseba Studio will never receive the requested information. I'd suggest
if (vm->variablesOld)
for (idx = 0; idx <= vm->variablesSize; idx++) {
...
}
else
AsebaSendVariables(vm, 0, vm->variablesSize);
The text was updated successfully, but these errors were encountered:
In function
AsebaSendChangedVariables
in aseba/transport/buffer/vm-buffer.c, about the testvm->variablesOld && idx <= vm->variablesSize
in thefor
loop:vm->variablesOld
is probably defined (non-NULL) in all Mobsya uses, including in aseba-target-thymio2 (definition ofvmState
in file skel-usb.c). But if the purpose ofvm->variablesOld &&
is to handle cases wherevariablesOld
doesn't exist, i.e.vm->variablesOld
is NULL, then:if
The text was updated successfully, but these errors were encountered: