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

Add Graupner ESC telemetry support #174

Merged
merged 6 commits into from
Oct 7, 2024
Merged

Add Graupner ESC telemetry support #174

merged 6 commits into from
Oct 7, 2024

Conversation

rotorflight
Copy link
Owner

No description provided.

@rotorflight rotorflight marked this pull request as ready for review October 5, 2024 10:29
rrfsmMinFrameLength = GRAUPNER_MIN_FRAME_LENGTH;
rrfsmAccept = graupnerAccept;
rrfsmDecode = graupnerDecode;
rrfsmCrank = NULL;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rrfsmCrank is initialized to NULL + *SensorInit(...) is called once - no harm but initialization here not necessary

case ESC_SENSOR_PROTO_GRAUPNER:
callback = graupnerSensorInit();
baudrate = 19200;
options |= SERIAL_BIDIR;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SERIAL_BIDIR option is a function of config->halfDuplex and is already set if configured
... but this protocol appears to function only in request/response mode making half duplex (or full duplex w/ tx/rx) required.
Choices...

  • force half duplex operation ON here (now port state does not match port config - may create issues elsewhere)
  • enforce config->halfDuplex on setting config->protocol and fail the init (return false if not config->halfDuplex) as a sanity check? (a bit more effort but feels more robust)

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had the second option first, but then I thought what's the point there are no choices here. Why do we want the user to play roulette with it.

Copy link
Owner Author

@rotorflight rotorflight Oct 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The right thing is to set use the validateAndFixConfig routine and change the halfDuplex to true if Graupner is selected.
I'll fix this.

@rotorflight rotorflight merged commit 27fe36b into master Oct 7, 2024
1 check passed
@rotorflight rotorflight deleted the graupner branch October 7, 2024 09:37
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

Successfully merging this pull request may close these issues.

3 participants