Open sgawad opened 1 year ago
I think this may be due to a flaw in the implementation of Vector
. For now, could you try to create a local vector instead of returning a global one? E.g.,
Vector<uint16_t> as7341read() {
Vector u2(12);
// ...
return u2;
}
Thanks so much Jeroen,
That seems to solve the problem!! Works well now.
Have a great day,
Shady
On Tue, 24 Jan 2023 at 07:41, Jeroen F.J. Laros @.***> wrote:
I think this may be due to a flaw in the implementation of Vector. For now, could you try to create a local vector instead of returning a global one? E.g.,
Vector
as7341read() { Vector u2(12); // ... return u2; } — Reply to this email directly, view it on GitHub https://github.com/jfjlaros/simpleRPC/issues/30#issuecomment-1401459472, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABI6NO4BF3NZSCRTKTF2P6TWT52RNANCNFSM6AAAAAAUEOSWY4 . You are receiving this because you authored the thread.Message ID: @.***>
I will keep this open as a reminder.
Hello,
First thank you for the library and please excuse me but the behavior is driving me nuts and I don't know how to debug it by myself. I am trying to get data back from a color sensor on arduino through simpleRPC.
here is the declaration of the functions:
here is my interface definition:
I am using the Python interface. What I observe is that the setLed works everytime and returns reliably everytime For the read function it reads correctly 2 whole vector of 12 ints... but on the 3rd call the python seems to hang before returning the array. if I press the reset button on the arduino it traces back io.py in the _read_basic() function with unpack requires a buffer of 4 bytes.
I added some logging info but it doesn't help me much understand the issue. Here is a screen capture representing the first two calls and here is the 3rd one:
and here is the Log:
I tried to change the array to a size of one only ... I tried to change the type by casting it to int. Nothing seems to allow me to retrieve more than 2 arrays from the sensor... Thank you for your help.