Vilde Rieker (bf5c066d) at 28 Feb 12:30
fixed IP issuesand updated grabber closed position to not overload ...
... and 22 more commits
Firmware uploaded to robot and tested with the updated GUI. Works as intended.
I'll give it a read-through, and will write a summary before merging.
Regarding robotConnector.m
and obj.conn.BytesAvailable
/ obj.conn.NumBytesAvailable
!20 (bf5c066d)
The serial connection is created with
obj.SerialConn = serialport(obj.address, 9600);
obj.useSerial = true;
obj.conn = obj.SerialConn;
The serialport
class is documented here:
https://se.mathworks.com/help/instrument/serialport.html
It looks like it only really provides the NumBytesAvailable
variable, not BytesAvailable
Same is true for tcpclient, used to handle connections via Ethernet:
obj.TCPconn = tcpclient(obj.address,obj.TCPport, "Timeout", 2);
obj.useSerial = false;
obj.conn = obj.TCPconn;
Looking a bit into it, the BytesAvailable
property is actually deprecated, while NumBytesAvailable
is the new thing. Somehow the old BytesAvailable
worked fine on a newer version of Matlab than what Vilde had on her desktop PC.
See:
Therefore, just using NumBytesAvailable
is probably fine, and actually better than using BytesAvailable
? This needs to be checked tough, both for serialport and tcpclient.
If there is a version dependency, we can use https://se.mathworks.com/help/matlab/ref/ismatlabreleaseolderthan.html together with the useSerial
flag to determine what to do.
Vilde Rieker (bf5c066d) at 22 Feb 20:01
fixed IP issuesand updated grabber closed position to not overload ...
Pierre Korysko (5fd7ba9e) at 22 Feb 14:20
Updates for Steppers and Grabber
Vilde Rieker (b9997682) at 22 Feb 12:59
updated latest GUI version to accommodate two filters. Minor visual...
... and 1 more commit
Vilde Rieker (c4195eac) at 22 Feb 11:18
removed excess files
Vilde Rieker (ad6a4a5a) at 22 Feb 10:46
added GUI with buttons for two filters
... and 2 more commits
Pierre Korysko (4ed168c4) at 21 Feb 11:20
Changed PIN Numbers and Timings
Pierre Korysko (cfbda836) at 21 Feb 10:37
Changes for C-Robot2.0
Sounds good! I was planning on getting it done by the end of this week. I was working on updating the GUI before xmas, but dunno if other changes has been made to it since then or if I can continue with the base-version from October @pkorysko?
Ping @vrieker @pkorysko . Let's get this thing done.
I remember discussing with Pierre that the current version of the GUI is only maintained in a .m file, which is great. If he could commit the newest version of that to a branch, or just upload it somewhere? Then we could merge it in here, and update the code to match the new functionality of the connector.
Finally we can merge to master. Not much left to do now!
Have you checked if the data still saved to the logfile? If I remember correctly, it is supposed to save after every shot to guard against data loss on crash. But of course, if irradiation continued after crash, it might be worthless.
ping @pkorysko
Note that before merging, the config stuff has to brought back to a more "standard" configuration (i.e. with the debugging / hardware emulation flags disabled).
OK, I think the Arduino code and the MatLab connector library are now both done. The step is to finish the interface. Anyway this version of the arduino code will NOT be compatible with the old connector, which is NOT compatible with the old GUI, since the filter to move in/out is now a variable. It should however handle it fine if the number of filters is equal to 1.
Question to @pkorysko : Maybe we should think about getting as much as possible of the code outside of the "gui designer" thing in MatLab? At least we could move the configuration stuff to a separate .m file, containing a function which returns the values? Like that it would be much easier to separate "code" changes that should be in git, and "config" changes that can change every week.
We could also think about just not using the GUI designer anymore, just pure file editing. That might actually make things easier to maintain by letting things be more dynamic, AND make it easy to track with version control. I see that Vilde already did some changes like that here, replacing the endless list of buttons with an array of them... The new MatLab GUI designer is ultra-slow and generally uncomfortable to use, in my opinion.
At least we could move i.e. the "pick up things and move it around" logic to a separate .m file, outside of the "draw buttons on the screen" code.
Kyrre Ness Sjobaek (71f09163) at 23 Nov 14:13
Better HELP, more error handling in MatLab, consistent @-ifying of ...
Kyrre Ness Sjobaek (481c0f5b) at 23 Nov 10:23
Update MATLAB parser to deal with multiple filters