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

Frm301 #1

Open
wants to merge 98 commits into
base: master
Choose a base branch
from
Open

Frm301 #1

wants to merge 98 commits into from

Conversation

gagarinlg
Copy link
Owner

No description provided.

pkendall64 and others added 12 commits July 3, 2022 10:08
* Refactor and fix popup touch events

* Optimize code size

* Remove touch2evt for B&W users

* Reduce overhead of byteToStr
…ty_target

Pin define `ant_ctrl` typo on Namimno 2.4g Diversity target
* Add RX with PA and RGB

* Add PIO target for configurator

* Add Foxeer PA-RGB target
* OTA fullres power level needs to limit to 0-7

* Add comment to packet struct

* Add test_encodingFullresPowerLevels

* Fix incorrect comment
gagarinlg pushed a commit that referenced this pull request Sep 2, 2022
* sx1280Driver: Add getRssiInst function

* Clear Channel Assessment aka Listen Before Talk, first working prototype. 500hz, hardcoded rxtimeout and threshold

* Repurposed downlink link quality for LBT success ratio

* Add dynamic GetRssiInst() valid delay depending on Lora SF mode
Add dynamic listen before talk rssi dBm threshold depending in tx power

* use currPower instead of max dynamic power for LBT threshold

* fix currPower() for rssi threshold

* Listen Before Talk
Got rid of while loop waiting for rx valid by enabling rx for LBT early in TX interrupt
Changed LBT RSSI thresholds to not adjusted for receiver bandwidth.
This interpretation of the thresholds assumes RSSI dBm values from sx1280 already
are correct for the configure receiver bandwidth configuration.

* removed unused valid rssi delay

* restart RX to clear potential packets received during listen before talk from rx buffer

* restore downlink LQ to normal operation, keep LQ calc for LBT for future use

* work in progress, LBT on rx side

* document polling loop on getRssiInst, restore downlink LQ to indicate downlink LQ, not LBT success rate

* add -DRegulatory_Domain_EU_CE_LBT_2400 define for enabling LBT

* add adjustment offset #define for rssi reading

* Exclude LBT code from radio_900 builds

* move LBT clear channel assessment closer to where TX happens to simplify rx_main

* add us wait delay for valid RSSI reading instead of just waiting for rssi to be above -127db, fixes issue with too low rssi for rx target, where rssi is read very soon after lbt rx enable

* attempt at more clever way to select LBT mode if minpower is higher than non-LBT 10mW limit

* Single EU_CE regulatory option
Add preprocessor switch between LBT or non-LBT operation based on configured maxPower

* remove debug #warning for LBT_ACTIVE

* remove LBT regulatory define from user_defines

* use delayMicroseconds instead of while-loop in LBT waiting for readability

* Auto switch LBT based on power config (#1)

* auto switch LBT based on config

* changes after review

Co-authored-by: Anders G <andlier@users.noreply.github.com>

* add safe runtime disabling of LBT, since LBT routines fiddles with interrupt enable flags

* make LBTEnable if else formatting more concise

* Move LBTEnable flag and if-else logic into LBT.cpp, keeps tx/rx_main less cluttered

* fixes after rebasing on master

* Using flag to skip ISR instead of disabling interrupts while doing LBT

* simplified LBT, attempts to be compatible with rx-auto-off timeout

* add lbtstarted flag to allow calling beginCCA twice without restarting RX and timer

* attempt at fixing listen before talk for 1:2 rate telemetry

* Remove unused GetMode function in sx1280 driver and rename LBT flag variable for delayed call of TXdoneCallback.

* Improvements after review
LBT.h/cpp: remove uneccessary volatiles, add static to LBT internal variables.
Remove LBTChannelBusy variable, use LQCALC currentIsSet for LBT success instead.
Wrap LBT.h/cpp in #if defined REG_DOMAIN

* POWERMGNT.h/cpp: Inline currPower

* LBT: simplify calculation of remaining validRssiDelay wait time

* Repurpose downlink LQ for LBT success ratio when EU reg domain defined

* simplified LBTEnable functionality, does not need to be synchronized disabling

Co-authored-by: Alexander van Saase <avsaase@gmail.com>
Co-authored-by: Paul Kendall <pkendall64@gmail.com>
pkendall64 and others added 16 commits September 4, 2022 04:44
* Fix 8285 RX as TX

* Print error if CRSF::connected it not initialised in freerun mode
* Add delay after CRSFconnect before TX transmit starts

* Change tentative to awaitingModelId

* Nothing is modified after TxConfig::SetDefaults

Co-authored-by: Jye <14170229+JyeSmith@users.noreply.github.com>
* Added EMAX targets

* Add RGB on 900 module

* Add PIO files for EMAX targets

* Added targets to platformio.ini

* Fix emax RX target after merge

* Add in the actual plain jane RX

* Add fan feature

* Remove RX targets as we can use aliases

* Remove Emax "plain-jane" as the pins are wrongly ordered

* Add DCDC to the PA target

* EMAX 2400 OLED power value calibration

* Adjusted power values to EMAX supplied ones

Co-authored-by: Nikhil Parikh <nikhilcjparikh@gmail.com>
Co-authored-by: Sunjun Kim <SunjunKim@users.noreply.github.com>
Use 250hz default rate for 2.4, 50hz for 868/900
Co-authored-by: Jye <JyeSmith@users.noreply.github.com>
* PWRPENDING_NONE set to be an invalid value

* comment update
deadbytefpv and others added 29 commits October 31, 2022 06:37
* The actions in the FIFOs need to be atomic

So wrap them in critical sections

* Remove volatiles as per review
* Fix error in initial network setting

* bloody stupid python!
* Use 100 packets missed instead of 1s fixed PWM failsafe

* Fix PWM failsafe not working on digital outputs

* Extend 25Hz disconnect 5s->9s to allow at least

* Revert 25Hz 9000ms disonnect timeout

* Return of absolute failsafe timeout for PWM

Co-authored-by: Jye <14170229+JyeSmith@users.noreply.github.com>
Co-authored-by: Jye <JyeSmith@users.noreply.github.com>
* add high pwm freq support, add writeDuty function to set pwm duty directly

Signed-off-by: huangzzk <huangcmzzk@gmail.com>

* extend narrow to 3bits

Signed-off-by: huangzzk <huangcmzzk@gmail.com>

* add DIY_2400_RX_ESP32_PWM target and add DIY ESP32 PWM5 MOS.json hardware layout

Signed-off-by: huangzzk <huangcmzzk@gmail.com>

* reduce unused bits to 11 because of narrow extending

Signed-off-by: huangzzk <huangcmzzk@gmail.com>

* fix target name:DIY_2400_RX_ESP32_PWM_MOS_via_UART

Signed-off-by: huangzzk <huangcmzzk@gmail.com>

* swap the index of PWM2 and PWM3, and now pwm3 is with mos.

swap the index of PWM1 and PWM5, and now pwm5 is with mos(a backup mos channel)
Signed-off-by: huangzzk <huangcmzzk@gmail.com>

* add 10KHz PWM support

Signed-off-by: huangzzk <huangcmzzk@gmail.com>

* add getLedcChn function, so that we can get different freq at ch0-ch3

* add some 0xff pin to holdplace, so that the 2 channels with mos could have the same freq

Signed-off-by: huangzzk <huangcmzzk@gmail.com>

* add allocateLedcChn to allocate timer for pwm channels

Signed-off-by: huangzzk <huangcmzzk@gmail.com>

* rename 'narrow mode' to 'pulseWidthMode' becasue we add duty mode inside, to prevent misunderstanding.

Signed-off-by: huangzzk <huangcmzzk@gmail.com>

* Revert "add some 0xff pin to holdplace, so that the 2 channels with mos could have the same freq"

This reverts commit fd83191.

* Revert "swap the index of PWM2 and PWM3, and now pwm3 is with mos."

This reverts commit 0779155.

* Revert "fix target name:DIY_2400_RX_ESP32_PWM_MOS_via_UART"

This reverts commit 4bbbc79.

* Revert "add DIY_2400_RX_ESP32_PWM target and add DIY ESP32 PWM5 MOS.json hardware layout"

This reverts commit cdbdbc4.

* fix build error for esp8266

Signed-off-by: huangzzk <huangcmzzk@gmail.com>

* edit formatting

Signed-off-by: huangzzk <huangcmzzk@gmail.com>

* Code formatting

* revert extending narrow to 3 bits, add constrain before setting duty, change 10Khz to a special 10KhzDuty mode

Signed-off-by: huangzzk <huangcmzzk@gmail.com>

* Fix minor formatting

* Add upgrader from V5 to V6 RX config

Signed-off-by: huangzzk <huangcmzzk@gmail.com>
Co-authored-by: Paul Kendall <pkendall64@gmail.com>
* Add foxeer lite to targets

* add betafpv superd

* Add a couple missing targets
* RadioMaster Ranger Micro & Nano TX Modules

* Add Radiomaster Ranger external module

* Fix for ranger WIFI flashing

* Add missing ER5 series

* Rename file as per review
Co-authored-by: Jye <JyeSmith@users.noreply.github.com>
* add generic gemini tx target

* add FHSS func for offset frequency

* update tx to set 2 different radio freqs

* update rx and rxLua for gemini mode

* dont use SX1280_RADIO_SET_AUTOFS in Gemini mode

Using SX1280_RADIO_SET_AUTOFS causes the 2 radios to end up in different modes e.g. FS after receiving a packet and standby after timeout.  This causes issues with dio timings.

* adds guards to RX and TX doneISR

In Gemini mode a noisy environment with lots of transmitters and interference can cause the radios to get a few 10us out of sync.  This can then cause the following tx done IRQ to be out of step and double call TXdoneISR.  Which can cause a double freq hop.  This is also a simple guard during normal operation.

* Updated tx target for testing, but this should not be used for a production tx!

* correct RXdoneISR guard

* add missing SetFrequencyReg

* update tx to be internal

* adds FHSSgetInitialGeminiFreq()

* add Gemini option to tx Lua

* add uplink_RSSI_2 and active_antenna updates

* add isDualRadio()

* update tx target for e28 modules and backpack

* Remove unnecessary boot0 high write...

Setting this gpio high was causing the pin to oscillate .  NFI why.  The write is not required and boot0 can be left low during flashing.

* add back SetFrequencyHz for startCWTest

* update sx127x lib

* change SX12XX_Radio_Number_t name

* update SetFrequencyHz to use SX12XX_Radio_Number_t

* fixes after merging in master

* update TXenable for gemini

* more cleaning after master merge

* adds LBT to gemini mode

* add power_lna_gain to gemini tx

* correct LBT for the Default single antenna state

* adds tx_all_enable_set/clr_bits

* kill all the magic numbers!

* add comment for SX1280_RADIO_SET_AUTOFS

* gemini check when calling SetRFLinkRate()...

... otherwise it isnt set correctly after a config change.

Co-authored-by: Jye <JyeSmith@users.noreply.github.com>
rename files according to project changes
fix: build system changes
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.