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

Inspire 2 switch config #101

Open
chrissearle opened this issue Jan 18, 2017 · 4 comments
Open

Inspire 2 switch config #101

chrissearle opened this issue Jan 18, 2017 · 4 comments

Comments

@chrissearle
Copy link
Collaborator

chrissearle commented Jan 18, 2017

Inspire 2 RC switch - only has P, S, A - no F.

Needs adding to ModelConfig.plist

@NosDE
Copy link

NosDE commented Feb 16, 2017

I think the Inspire 2 will not report the Value 3, when the FlightModeSwitch is in position "P".
It would be nice, when the DDLogDebug in the PanoramaController (L197) would print the RAW Value of remoteController.mode too. This could help to tackle down this Problem.

@dbaldwin
Copy link
Owner

Have you tested with the latest public release and verified that it does not work? If you'd be willing to test an ad hoc build this would help us get a beta out for all I2 users. If you can hop into our gitter chat we can talk about getting you an ad hoc build (assuming the current version doesn't work for you). https://gitter.im/dbaldwin/DronePan

@chrissearle
Copy link
Collaborator Author

All we know from the docs is the following:

public enum DJIRemoteControllerFlightModeSwitchPosition : UInt8 {
    
    /**
     *  Position One. For all products except Mavic Pro, this is the left most
     *  position of the flight mode switch on a remote controller from the
     *  perspective of the pilot. For example, on a Phantom 4 remote controller,
     *  Position One is labeled "A".
     *  For the Mavic Pro, this is the position that is furthest away from the
     *  pilot and labeled "Sport".
     */
    case One
    /**
     *  Position Two. For all products except Mavic Pro, this is the middle
     *  position of the flight mode switch on a remote controller from the
     *  perspective of the pilot. For example, on a Phantom 4 remote controller,
     *  Position Two is labeled "S".
     *  For the Mavic Pro, this is the position that is closest to the pilot
     *  (the P position).
     */
    case Two
    /**
     *  Position Three. For all products except Mavic Pro, this is the right
     *  most position of the flight mode switch on a remote controller from the
     *  perspective of the pilot. For example, on a Phantom 4 remote controller,
     *  Position Two is labeled "P".
     *  The Mavic Pro does not have a third position for the flight mode switch.
     */
    case Three
}

The change from reporting switch setting to position of 1, 2 or 3 and making every app maker have a table of what switch position is what for each model is such a poor decision. But we have to work with it.

That being said - I have no idea what switch position the i2 needs to be able to allow us to use flight controls from the SDK.

I went with 3 because it says it is the right most for all except the mavic and on all the other models the rightmost was the one we wanted.

If someone has an i2 then we need to test it with the different values.

@NosDE
Copy link

NosDE commented Feb 16, 2017

I got a Log from Rik Bjil (he owns a I2) (i can test only with Mavic Pro and P4P)

D: 2017/02/14 13:57:08:009 [com.apple.main-thread/13351] PanoramaController checkRCMode() line: 197 Not in correct mode - saw DJIRemoteControllerFlightModeSwitchPosition for model Inspire 2

But in the Log there is no value...
So i recommend to change Line 197 of PanoramaController.swift to:

DDLogDebug("Not in correct mode - saw (remoteController.mode) (RAW:(remoteController.mode.rawValue)) for model (model)")

This would give us the required Information for future debugging.

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

3 participants