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

SX1280 FLRC Initial Work #6

Merged
merged 7 commits into from
Jun 4, 2023
Merged

SX1280 FLRC Initial Work #6

merged 7 commits into from
Jun 4, 2023

Conversation

jlpoltrack
Copy link
Contributor

@jlpoltrack jlpoltrack commented May 20, 2023

Motivation: FLRC offers a lot more throughput at similar sensitivities to LoRa SF5 (currently used for 50 Hz)

Example:

  • 0.65 Mb/s, Code Rate 1/2
  • Sensitivity: -104 dBm (-105 dBM for LoRa SF5)
  • OTA: 2.48 ms
  • 100 Hz possible ? : 6,400 Bytes Uplink, 8,200 Bytes Downlink

image

@jlpoltrack
Copy link
Contributor Author

Very ugly proof of concept working (repurposes 50 Hz mode for FLRC): https://github.com/jlpoltrack/mLRS/tree/FLRC-Proof-of-Concept

src/sx128x.h Outdated Show resolved Hide resolved
@olliw42
Copy link
Owner

olliw42 commented Jun 1, 2023

VERY COOL

I am unfortunately so much behind with so much mLRS stuff that I may not find time myself to test it.

But I think we should get serious about getting this PR merged :)

On a quick glance, I only have one thought: You do have put the label FLRC in each addition (except in one enum, where you want to change it to SX1280_FLRC_xxx), which is great, but I still find it a bit mixed. I'm not sure what to propose instead, but I guess I would have tried how it looks like if one always puts the FLRC in front, like as if it were a class or struct. Which makes me think if the functions couldnt in fact be in a class FLRC inside the sx class? Not very mature thoughts, but this is what crosed my mind. :)

Also, maybe, one could separate by e.g. moving all FLRC stuff to the end, with a nice comment as title "FLRC"

So, it's really just about making it nice, not functional :):):)

src/sx128x.h Outdated Show resolved Hide resolved
@olliw42
Copy link
Owner

olliw42 commented Jun 1, 2023

with OTA 2.8 ms, why 100 Hz and not 150 Hz (as I think you suggested initially)?

@jlpoltrack
Copy link
Contributor Author

On a quick glance, I only have one thought: You do have put the label FLRC in each addition (except in one enum, where you want to change it to SX1280_FLRC_xxx), which is great, but I still find it a bit mixed. I'm not sure what to propose instead, but I guess I would have tried how it looks like if one always puts the FLRC in front, like as if it were a class or struct. Which makes me think if the functions couldnt in fact be in a class FLRC inside the sx class? Not very mature thoughts, but this is what crosed my mind. :)

Also, maybe, one could separate by e.g. moving all FLRC stuff to the end, with a nice comment as title "FLRC"

Many thanks for the feedback (and no rush :) ). For the moment, I've updated the sync word registers and preamble defines to include FLRC so that everything that should use FLRC has 'FLRC' in the name. Have also put everything at the end in FLRC sections.

with OTA 2.8 ms, why 100 Hz and not 150 Hz (as I think you suggested initially)?

When I did some calculations, it seemed that ~2.1 ms per packet was needed for processing. For example, for LoRa 50 Hz:

(7.892 + 2.1) * 2 * 50 = 999.2 ms.

So while the OTA is now 1/3rd of 50 Hz, the processing time doesn't scale down and 100 Hz seemed to fit.

Further, when I did some testing by editing these lines for 100 Hz (or even 53 Hz): https://github.com/olliw42/mLRS/blob/main/mLRS/Common/setup.h#L310 and updating the TOA here: https://github.com/olliw42/mLRS/blob/main/mLRS/Common/sx-drivers/sx128x_driver.h#L238 I couldn't get good results (so I imagine I'm missing something...)

The last test I did was to increase the packet size to 127 bytes (FLRC max) and that had no issues running at 50 Hz, saw over 5 kbytes/sec on the Mission Planner stats screen during a parameter download.

@olliw42
Copy link
Owner

olliw42 commented Jun 1, 2023

100 Hz:
ah, ok. Many thx for the insight. 150 Hz would have just sounded "cooler" LOL (also becasue it is what crossfire offers, doesn't it). We will work out the best combination with time.
It's a great start, however.

Hopefully we can get the other two issues (tx crash, rc signals) sorted out.

@olliw42 olliw42 merged commit 3b81d59 into olliw42:main Jun 4, 2023
@olliw42
Copy link
Owner

olliw42 commented Jun 4, 2023

merging this.
MANY THX!!!

@jlpoltrack jlpoltrack deleted the SX1280-FLRC branch October 27, 2023 23:36
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.

2 participants