-
Notifications
You must be signed in to change notification settings - Fork 21
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
Use real headers and structures to define tables #17
Comments
Just discovered this one, its a real problem. The tables are defined as an array of Line 104 in b59d70a
But the "TimeTag" value here is a Line 59 in b59d70a
Therefore, on a little endian machine, if the TimeTag is not 0, the value is incorrect. The default RTS examples (e.g. rts001, rts002) both use a value of 0 for the TimeTag, so the bug gets hidden - it never attempts to send the other 2 commands in the RTS, that have nonzero values here. I changed CMD1_TIME from 0 to 1, and sure enough, the It looks like ATS was updated to split the time tag into a 16-bit MS and LS word (a hack, but will at least get the logical value to come through), but RTS was not updated in the same manner. |
@jphickey I've got a PR that was just waiting on something to switch to using the actual structures. Whatever I was waiting on is probably in by now if you want me to move this forward. It doesn't fix how RTS/ATS define time differently... but at least it's endian agnostic. |
Fix #17, Use real message types in tables
RTS uses a relative time tag that is 32 bit native endian. Current definition of tables uses a uint16 array which makes the table endian specific.
Could instead define a structure with the real contents (headers and commands), union with an array to make it the right size, then use designated initializers. This would allow the compiler to handle the endianness.
Imported from GSFCCFS-1841
The text was updated successfully, but these errors were encountered: