Hi, @andyp1per , @tridge may be interested
(committed about this topic)
Can You explain how GPIO works for camera 1 or 2 selection for FC SkystarsH7HD ?
Neither in betaflight or inav, or looking at arducopter hwdef.dat files for this board, I am able to configure out a practical way to see camera output intermixed with OSD data through vtx.
In other words, cam1 and cam2 input pins on FC board do no transmit signal to vtx. Default should be camera 1, but it does not work, I see through goggles only OSD data.
I write here because arducopter hwdef.dat file referes a PIN-EN gpio to pull up to choose default cam1, but I cannot understand what referes to, no PIN-EN exists on SkystarsH7Hd board, or it is not clear if pull-up means hw pull.-up with resistor (where in hw ??) or sw pull-up by user mode stick-commands or the like.
Hey Alfredo, make sure you are using the -bdshot target - there are a lot of other fixes in that target that you will almost certainly need. In that target the pin is mapped to RELAY3_PIN - so you can modify the default by changing RELAY_DEFAULT. The pin is a virtual pin mapped onto the MCU - so you need to change the value in software
but at the moment I configured Inav (I built a custom target, there is no skystarsh7hd in inav currently.
I did not succed with ardupilot, because flysky ibus rx was not recognized on uart1, I could not proceed in configuration with MP and other tools, no way to come out of it, I am not expert in arducopter, but I read it should accept all protocols for rx, including IBUS.
But let us go back to the main topic :
I would like to know which pin (pinio/gpio) (example : D01, B02 or the like) must be mapped in sw in order to address C1 point in FC for soldering fpv camera input.
otherwise I will have to (trial) bypass directly C1 connecting by soldering to OSD 7456 video input pin.
What is currently mapped as resource does not work, either BF or Inav, so I guess pins are not correct.
Please tell me if I am wrong in following this steps.
BF/INAV shows as pinio resources for cam selection PINs
resource PINIO 1 C05
resource PINIO 2 C02
resource PINIO 3 D11
set pinio_box = 40,41,255,255
this is similar to (hwdef.dat)
VTX Power control - should be high at startup to ensure power
PC5 VTX_PWR OUTPUT HIGH GPIO(81) # labelled as “Pit-1”
Camera selection - should be high so that Video 1 is selected by default
PC2 VID_SELECT OUTPUT HIGH GPIO(82) # labelled as “PIN-EN”
OSD pad for TTL based OSD control, not supported by AP
PD2 CAM_C OUTPUT LOW GPIO(83) # labelled as “CAM-C”
Is the problem related to this mapping, or there is something else I miss ?
I am interested only in activating camera 1 input to OSD, nothing else.
Thank You again in advance,
Did you try the configuration I suggested in ArduPilot? If it doesn’t work I can investigate with the board I have here, but not going to do this for iNav
Inav configuration officially does not exst, because I just created it locally,
but Skystarsh7hd comes with BF and Ardupilot.
I do not know who came first …
I guess both suffer same problem.
So, who did first assign gpio ?
If You did first configure it, You are welcome to check !!.
If BF came first, there is already an open issue for it (I did).
If You configured both BF and Ardupilot, You have a chance to fix it for BF, Ardupilot and Inav (un-official target). !!!
Let me know if it is feasable, othwrwise I will find some alternate solution.
If I well understand,
I have to flash a custom arducopter and see if camera output reaches goggles …
Seems simple.
Of course I will get a lot of alarns, because I am not able to conplete arducopter configuration.
How do I extrapolate exact pin to port to inav and bf (that is my target )?
I made another flash install with arducopter following Your tips, but I got again stuck in flysky ibus rx calibration step, ibus has not been recognized, and it would take me too long to get acquainted with raw configuration parameters, so I reverted to inav 5.1 and succeded in putting everything to work, all but video input passthrough and cam1 selection.
I might setup a test bench to find out what is my problem, but at the moment I chose to use an external frsky OSD, that works, just a few more cable connections around …
I will leave this discussion open, just in case anybody has any ideas about.
B7AJ switch might be responsible for failure of video in passthrough to osd chip.
Could be a soldering problem.
PC2 pin is correctly addressed to fc from the B7AJ switch.
I detached the switch from the board and
I connected directly video from camera to the capacitor of video in pin of osd chip.
Now it works (I see data and image at the same time on goggles).