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

[OSD] RSSI is always zero #2514

Closed
SandroGrzicic opened this issue Nov 27, 2016 · 4 comments
Closed

[OSD] RSSI is always zero #2514

SandroGrzicic opened this issue Nov 27, 2016 · 4 comments
Milestone

Comments

@SandroGrzicic
Copy link

SandroGrzicic commented Nov 27, 2016

Latest (master) CF flashed to the OSD shows a RSSI of zero no matter what the actual RSSI is sent from the FC.

Looking at osdElementRender_rssi.c, we have:

uint16_t rssi = (uint16_t) dataFn();
tfp_sprintf(elementAsciiBuffer, "%3d", (rssi / 1023) * 100);

But rssi is always between 0 and 1000 since in msp_client_osd.c we have:

fcStatus.rssi = scaleRange(sbufReadU16(src), 0, 1023, 0, 1000);

So won't any rssi between 0 and 1000 after being divided by 1023 be zero?

Since rssi is 0 to 1000, isn't it enough to have:

tfp_sprintf(elementAsciiBuffer, "%3d", rssi / 10);

?

See 058e9da

I have changed the above calculation to rssi / 10 and now RSSI is showing up properly in the OSD.

@hydra
Copy link
Contributor

hydra commented Nov 29, 2016

yes, this was due to unmerged changes for the spracingf3neo board support which handled this differently. Likely we will need to address this again when that branch is merged in.

@hydra
Copy link
Contributor

hydra commented Nov 29, 2016

See #2517

@hydra hydra added this to the 1.14.2 milestone Nov 29, 2016
@SandroGrzicic
Copy link
Author

SandroGrzicic commented Nov 29, 2016

Since my PR has been merged I'll close this issue, a new one can be raised if there is any RSSI issue later on.

hydra added a commit that referenced this issue Dec 6, 2016
hydra added a commit that referenced this issue Dec 6, 2016
@hydra
Copy link
Contributor

hydra commented Dec 6, 2016

see cb6c861

jflyper pushed a commit to jflyper/cleanflight that referenced this issue Dec 19, 2017
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