You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The server would properly receive the car state bits, which is held within a single 32 bit integer
The server would properly assign those bits to the Bits_ property of the CarStateTransceiver
The server would -- actually -- properly compare if cars were idle or not, because that used a direct comparison of the Bits_ property between zero and the car state.
The server would not call Serialize to convert from Bits_ to an actual car state.
The server would stream out by converting the car state properties to bits -- the properties which wee never serialized in from the streamed in bits.
This means that the server had the right bits for the car state, but those bits never became proper values, so the properties were always zero.
In version 0.1.3, this was fixed with a workaround:
Received car state bits do not go into the CircularBuffer for CarDirectives
Received car state is manually streamed in using the main CarDirectives in the CarLogic, instead of using a CarDirectives in the CircularBuffer
CarDirectives.Serialize is manually called to convert the car bits to car state properties.
This in effect assumes that the most recently received car state is the newest and ignores the timestamp attached to the state.
It should be possible to go back to using the CircularBuffer and just call Serialize on the main CarDirectives in CarLogic after running Update. This will bring behavior back to Distance's, where the timestamp matters and the most recently received state is not assumed to be the newest.
Activity
Corecii commentedon Dec 25, 2018
This bug was caused by...
Bits_property of the CarStateTransceiverBits_property betweenzeroand the car state.Serializeto convert fromBits_to an actual car state.This means that the server had the right bits for the car state, but those bits never became proper values, so the properties were always zero.
In version 0.1.3, this was fixed with a workaround:
This in effect assumes that the most recently received car state is the newest and ignores the timestamp attached to the state.
It should be possible to go back to using the CircularBuffer and just call Serialize on the main CarDirectives in CarLogic after running Update. This will bring behavior back to Distance's, where the timestamp matters and the most recently received state is not assumed to be the newest.