Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q (bug?): Garbled data on complex sketches - (concurrency?) isssue in DcsBiosNgRS485Slave.cpp.inc #41

Open
krorvik opened this issue Dec 26, 2022 · 2 comments

Comments

@krorvik
Copy link

krorvik commented Dec 26, 2022

I am seeing garbled string data (F-16 DED) , and randomly firing LEDs in complex sketches.

According to this comment from the DCS forums (credit BoboBear):

https://forum.dcs.world/topic/208455-dcs-bios-over-rs485/page/3/#comment-4374711

There seems to be an unreported issue In function:

void RS485Slave::rxISR()

I tested the fix mentioned in the issue, that is, set the state before processing - and this indeed seems to fix the problem. The RX_WAIT_DATA case is changed to look like this:

case RX_WAIT_DATA: rxtx_len--; if (rxtx_len == 0) { state = RX_WAIT_CHECKSUM; } if (rx_datatype == RXDATA_DCSBIOS_EXPORT) { parser.processCharISR(c); } break;

Should this be considered as a patch?

@krorvik
Copy link
Author

krorvik commented Dec 26, 2022

Making this a question for now since I do not have the knowledge to evaluate any other effects.

@krorvik krorvik changed the title Bug: Garbled data on complex sketches - (concurrency?) isssue in DcsBiosNgRS485Slave.cpp.inc Q (bug?): Garbled data on complex sketches - (concurrency?) isssue in DcsBiosNgRS485Slave.cpp.inc Dec 26, 2022
@maciekish
Copy link
Collaborator

Im seeing the same issue with a slow drawing LCD. Serial buffer too small? Incorrect interrupt handling? Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants