|
|
|
Re: Lego Ports couldn't be read [message #1805794 is a reply to message #1805592] |
Wed, 24 April 2019 04:19   |
Eclipse User |
|
|
|
Hi,
thanks for the detailed information. It really helps!
Regarding your issue: I think you already found the issue. If !mAddressFile.fail isnot true, it means that reading the file failed. You can see http://www.cplusplus.com/reference/istream/istream/read/ for more information. Maybe the error occurs before reading (at seekg or clear()). Write permissions are not the problem here I'd say. Unfortunately I cannot help more here.
Regarding paIsInput, this is comes from the FB (IX, IW, ID). The if statement are to prevent using it incase someone uses for example a QX with sensor. Now, this could probably be done before calling setupSensor().
And, as you pointed out, there are some weird things in the code. This code was writen 3 years ago and never again maintaned. There are many "if (true == VARIABLE)" that can be replace for "if(VARIABLE)" and lot of logging errors are missing that would make debugging quicker (as in your case for example).
we are always happy to see new people contributing to the code. If you want improve C++ skills, this is a great opportunity. I guarantee you that you'll get good reviewers. See https://www.eclipse.org/4diac/en_help.php?helppage=html/development/contributeToForte.html for more information.
|
|
|
|
Re: Lego Ports couldn't be read [message #1805833 is a reply to message #1805322] |
Thu, 25 April 2019 03:54  |
Eclipse User |
|
|
|
Thank you, I will try it out on monday.
Edit: It did not work. I have added an error message in case eof was reached, but it did not display it.
[Updated on: Mon, 29 April 2019 03:09] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.06514 seconds