-
Notifications
You must be signed in to change notification settings - Fork 5
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
Define config protobuf message type #153
Comments
Or you could scale timing information. |
Right now we record: We could scale to microseconds and transmit. The issue that I can think of is if we reduce the size of the unsigned int use to store/transmit timing information from uint32_t to uint16_t or uint8_t, we'd have to be careful about overflow. With uint32_t the timestamp will overflow in 4.97 days at 10 kHz and 11.9 hours at 100 kHz. |
The way I see it now there are three options:
|
One issue that could arise is if we use different clock frequencies in different headers/projects, we would need to know which is the right frequency when decoding.
I think we could just send the clock frequency once in the first message |
We already do this (dependent messages) for model stuff since we would be
retransmitting a lot of data that doesn't change with each message.
On Mar 23, 2017 12:55, "Mick van Gelderen" <[email protected]> wrote:
1. scale to a unit that works for all possible clock frequencies
Floats are precise up to 6 significant digits (23 bits give steps of [image:
2^{-23} \approx 1.19\cdot10^{-7}]
<https://camo.githubusercontent.com/6f1545b90841c60597ff1a8c45f08eada0b96aa9/68747470733a2f2f6c617465782e636f6465636f67732e636f6d2f6769662e6c617465783f322535452537422d3233253744253230253543617070726f78253230312e313925354363646f7431302535452537422d37253744>
).
Usually relative timestamps can be represented by a float but an absolute
timestamp cannot. The value must be < 2^23 to prevent loss of precision.
I think we could just send the clock frequency once in the first message
If we can send a few extra bytes per message to make each message
individually interpret-able we should.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#153 (comment)>,
or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AC0-J7e57Xo0aiADCeycwozWNmW_Cu1aks5rol2WgaJpZM4MZd_f>
.
|
I think we need to fully define the protobuf message types, specifically the "configuration type", and the corresponding fields. This is related to #181 |
I'm also in favor of dropping the |
Just thought of something. We should include a session number because that might come in handy. There was a RNG unit on the microconroller right? |
Let's try to switch to proto3 when implementing this and two-way communication, but fall back to proto2 if it doesn't work. |
This is a build configuration option and can vary for different binaries. We should add the tick frequency to the protobuf message so that we can obtain timing information correctly and other fields related to the ChibiOS configuration.
tentative config schema
The text was updated successfully, but these errors were encountered: