Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
2b7918b
1st cut
geoffsim Dec 3, 2021
e4e6a91
Merge branch 'master' into HDZeroVTX
geoffsim Dec 3, 2021
84c4222
Update DJI OSD module to map HD coordinate system to SD.
geoffsim Dec 13, 2021
8108397
Include SD defines to support DJI module
geoffsim Dec 13, 2021
c56ab0c
Fix syntax error in dji code changes.
geoffsim Dec 14, 2021
446339d
Remove debugging code
geoffsim Dec 14, 2021
70cc857
Final tidy up.
geoffsim Dec 18, 2021
e09924e
Final tidy up.
geoffsim Dec 18, 2021
545843a
Update DJI OSD module to map HD coordinate system to SD.
geoffsim Dec 19, 2021
0d4a24f
Adhere to coding standards
geoffsim Dec 19, 2021
6dd2e50
Set font version to min required of 3.
geoffsim Dec 19, 2021
74cf8a4
Remove test #defines
geoffsim Dec 20, 2021
684fc96
Update settings documentation
geoffsim Dec 22, 2021
e62aa6c
Merge branch 'master' into HDZeroVTX
geoffsim Dec 27, 2021
a0799fe
Merge branch 'master' into HDZeroVTX
geoffsim Dec 27, 2021
7b53278
Optimise data transmissions
geoffsim Jan 5, 2022
97033dc
Increase writes per tick to 10 to cater for AHI.
geoffsim Jan 5, 2022
d3d7f34
Ensure analog OSD operates correctly when HDZero not selected.
geoffsim Jan 14, 2022
337dff0
Use uint32_t in sortSerialTxBytesFree when calculating the bytes used.
geoffsim Jan 18, 2022
7aa06a5
Send all changes each time drawScreen is called.
geoffsim Jan 18, 2022
d8ef57d
User the peripheral baud rate and not the msp baud rate
geoffsim Jan 20, 2022
36027c2
Ensure a drawscreen message is sent to VTX if the screen has been cle…
geoffsim Jan 22, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -4624,7 +4624,7 @@ IMPERIAL, METRIC, UK

### osd_video_system

Video system used. Possible values are `AUTO`, `PAL` and `NTSC`
Video system used. Possible values are `AUTO`, `PAL`, `NTSC`, and `HD`

| Default | Min | Max |
| --- | --- | --- |
Expand Down
2 changes: 2 additions & 0 deletions src/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,8 @@ main_sources(COMMON_SRC
io/displayport_msp.h
io/displayport_oled.c
io/displayport_oled.h
io/displayport_hdzero_osd.c
io/displayport_hdzero_osd.h
io/displayport_srxl.c
io/displayport_srxl.h
io/displayport_hott.c
Expand Down
2 changes: 1 addition & 1 deletion src/main/drivers/serial_softserial.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ uint32_t softSerialTxBytesFree(const serialPort_t *instance)

softSerial_t *s = (softSerial_t *)instance;

uint8_t bytesUsed = (s->port.txBufferHead - s->port.txBufferTail) & (s->port.txBufferSize - 1);
uint32_t bytesUsed = (s->port.txBufferHead - s->port.txBufferTail) & (s->port.txBufferSize - 1);

return (s->port.txBufferSize - 1) - bytesUsed;
}
Expand Down
6 changes: 6 additions & 0 deletions src/main/fc/fc_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
#include "io/displayport_frsky_osd.h"
#include "io/displayport_msp.h"
#include "io/displayport_max7456.h"
#include "io/displayport_hdzero_osd.h"
#include "io/displayport_srxl.h"
#include "io/flashfs.h"
#include "io/gps.h"
Expand Down Expand Up @@ -553,6 +554,11 @@ void init(void)
osdDisplayPort = frskyOSDDisplayPortInit(osdConfig()->video_system);
}
#endif
#ifdef USE_HDZERO_OSD
if (!osdDisplayPort) {
osdDisplayPort = hdzeroOsdDisplayPortInit();
}
#endif
#if defined(USE_MAX7456)
// If there is a max7456 chip for the OSD and we have no
// external OSD initialized, use it.
Expand Down
6 changes: 6 additions & 0 deletions src/main/fc/fc_tasks.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
#include "io/smartport_master.h"
#include "io/vtx.h"
#include "io/osd_dji_hd.h"
#include "io/displayport_hdzero_osd.h"
#include "io/servo_sbus.h"

#include "msp/msp_serial.h"
Expand Down Expand Up @@ -108,6 +109,11 @@ void taskHandleSerial(timeUs_t currentTimeUs)
// DJI OSD uses a special flavour of MSP (subset of Betaflight 4.1.1 MSP) - process as part of serial task
djiOsdSerialProcess();
#endif

#ifdef USE_HDZERO_OSD
// Capture HDZero messages to determine if VTX is connected
hdzeroOsdSerialProcess(mspFcProcessCommand);
#endif
}

void taskUpdateBattery(timeUs_t currentTimeUs)
Expand Down
4 changes: 2 additions & 2 deletions src/main/fc/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ tables:
values: ["BATTERY", "CELL"]
enum: osd_stats_min_voltage_unit_e
- name: osd_video_system
values: ["AUTO", "PAL", "NTSC"]
values: ["AUTO", "PAL", "NTSC", "HD"]
enum: videoSystem_e
- name: osd_telemetry
values: ["OFF", "ON","TEST"]
Expand Down Expand Up @@ -3049,7 +3049,7 @@ groups:
type: uint8_t
default_value: "OFF"
- name: osd_video_system
description: "Video system used. Possible values are `AUTO`, `PAL` and `NTSC`"
description: "Video system used. Possible values are `AUTO`, `PAL`, `NTSC`, and `HD`"
default_value: "AUTO"
table: osd_video_system
field: video_system
Expand Down
Loading