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

Fixed bind command, and added rough vtx implementation #6

Open
wants to merge 24 commits into
base: srxlv2-bf-4.0
Choose a base branch
from
Open

Fixed bind command, and added rough vtx implementation #6

wants to merge 24 commits into from

Conversation

SpektrumRC
Copy link

No description provided.

mikeller added 5 commits May 18, 2019 18:23
Enabled Multi Gyro on OmnibusF4 Nano V7
Remove deprecated USE_MULTI_GYRO
…r corruption (betaflight#8284)

Increase async FAT filesystem cache sectors to prevent blackbox header corruption
…light#8256)

Prevent 'system_hse_mhz' from showing in non-F4 'diff'/'dump'.
((vtxData->region & 0x01) << 3) |
((vtxData->power & 0x07));
#if defined(USE_SPEKTRUM_VTX_CONTROL) && defined(USE_VTX_COMMON)
spektrumHandleVtxControl(vtxControl);
Copy link
Owner

Choose a reason for hiding this comment

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

That's a good solution, reusing functions makes in more robust in this case.

@@ -657,6 +691,8 @@ void srxlv2Bind(void)
.payload = {
.request = EnterBindMode,
.device_id = bus_master_device_id,
.bind_type = DMSX_11ms,
Copy link
Owner

Choose a reason for hiding this comment

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

This was something that puzzled me. Should the bind type hard-coded or we should allow specifying it in CLI?
At first I thought these fields are only used in the GetBindInfo request, and filled by the receiver.

Copy link
Author

Choose a reason for hiding this comment

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

That's a good point. I think it should be a CLI parameter that defaults to DSMX_11ms, and the "srxlv2_bind" cli command uses the value from that parameter. That way, it should still use this value by default unless the user specifies otherwise. Currently, there should be no need to use anything other than DSMX_11ms for the receivers that will currently support srxlv2.
These fields are used by both requests. For example in a multi receiver system, the FC can GetBindInfo from one receiver, and then send that info to the other receivers so they match the bind state of the initial one, without having to rebind each one.

@@ -92,7 +92,7 @@ typedef enum {
} srxlv2BindRequest;

typedef enum {
NotBound = 0xAE,
NotBound = 0x0,
Copy link
Owner

Choose a reason for hiding this comment

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

Where did 0xAE came from? Did I misinterpret it?

Copy link
Author

Choose a reason for hiding this comment

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

You had it right based on the documentation, but this was one of the things Matt had to change when fixing the whole bind command implementation. I believe the change was related to some logic required to handle multi receiver systems.

mikeller and others added 18 commits May 20, 2019 20:01
Fixed setting / printing of VAR_UINT32 values.
Fixed printing of reset DMA options in 'diff'.
Add timer info to CLI 'timer' command.
Added selection by alternate function to CLI 'timer'.
Fix VTX chan to 0 via SetFreqByMHz
SPRacingF3NEO - Add BARO support.
Fix copy of profiles with last index
…UAL board. (betaflight#8333)

TARGET Update: add IIC Baro, SoftSerial, 1G Flash support for EXF722DUAL board.
SPARKY2 Assign correct pins for I2C1
Fix flash m25p16 driver sector erase
…etaflight#8320)

Changed 'timer' output to list timers based on alternate function.
[VIVAF4AIO] Fix for non-working ACC
…istance-fix

Add minimum descent distance
…at when the flight controller reboots, but the rx is already sending data, sending 0xFF as bus master id will make the receiver request a handshake again.

Fixed baud rate toggling when invalid packets are received. Initially, re-connection wouldn't work on 400k baud.
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.

4 participants