Skip to content

Commit c35b14e

Browse files
authored
Merge pull request #6458 from RomanLut/master
added vtx_smartaudio_early_akk_workaround option
2 parents 705de03 + c22218c commit c35b14e

File tree

5 files changed

+11
-2
lines changed

5 files changed

+11
-2
lines changed

docs/Settings.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,7 @@
501501
| vtx_max_power_override | 0 | Some VTXes may report max power incorrectly (i.e. 200mW for a 600mW VTX). Use this to override max supported power. 0 to disable and use whatever VTX reports as its capabilities |
502502
| vtx_pit_mode_chan | | |
503503
| vtx_power | 1 | VTX RF power level to use. The exact number of mw depends on the VTX hardware. |
504+
| vtx_smartaudio_early_akk_workaround | ON | Enable workaround for early AKK SAudio-enabled VTX bug. |
504505
| yaw_deadband | 5 | These are values (in us) by how much RC input can be different before it's considered valid. For transmitters with jitter on outputs, this value can be increased. Defaults are zero, but can be increased up to 10 or so if rc inputs twitch while idle. |
505506
| yaw_lpf_hz | 30 | Yaw low pass filter cutoff frequency. Should be disabled (set to `0`) on small multirotors (7 inches and below) |
506507
| yaw_rate | 20 | Defines rotation rate on YAW axis that UAV will try to archive on max. stick deflection. Rates are defined in tens of degrees (deca-degrees) per second [rate = dps/10]. That means, rate 20 represents 200dps rotation speed. Default 20 (200dps) is more less equivalent of old Cleanflight/Baseflight rate 0. Max. 180 (1800dps) is what gyro can measure. |

src/main/fc/settings.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3112,6 +3112,11 @@ groups:
31123112
default_value: "ON"
31133113
field: halfDuplex
31143114
type: bool
3115+
- name: vtx_smartaudio_early_akk_workaround
3116+
description: "Enable workaround for early AKK SAudio-enabled VTX bug."
3117+
default_value: "ON"
3118+
field: smartAudioEarlyAkkWorkaroundEnable
3119+
type: bool
31153120

31163121
- name: PG_VTX_SETTINGS_CONFIG
31173122
type: vtxSettingsConfig_t

src/main/io/vtx_control.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,11 @@
3939

4040
#if defined(USE_VTX_CONTROL)
4141

42-
PG_REGISTER_WITH_RESET_TEMPLATE(vtxConfig_t, vtxConfig, PG_VTX_CONFIG, 2);
42+
PG_REGISTER_WITH_RESET_TEMPLATE(vtxConfig_t, vtxConfig, PG_VTX_CONFIG, 3);
4343

4444
PG_RESET_TEMPLATE(vtxConfig_t, vtxConfig,
4545
.halfDuplex = true,
46+
.smartAudioEarlyAkkWorkaroundEnable = true,
4647
);
4748

4849
static uint8_t locked = 0;

src/main/io/vtx_control.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ typedef struct vtxChannelActivationCondition_s {
3131
typedef struct vtxConfig_s {
3232
vtxChannelActivationCondition_t vtxChannelActivationConditions[MAX_CHANNEL_ACTIVATION_CONDITION_COUNT];
3333
uint8_t halfDuplex;
34+
uint8_t smartAudioEarlyAkkWorkaroundEnable;
3435
} vtxConfig_t;
3536

3637
PG_DECLARE(vtxConfig_t, vtxConfig);

src/main/io/vtx_smartaudio.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,8 @@ static void saSendFrame(uint8_t *buf, int len)
506506
// XXX: Workaround for early AKK SAudio-enabled VTX bug,
507507
// shouldn't cause any problems with VTX with properly
508508
// implemented SAudio.
509-
serialWrite(smartAudioSerialPort, 0x00);
509+
//Update: causes problem with new AKK AIO camera connected to SoftUART
510+
if (vtxConfig()->smartAudioEarlyAkkWorkaroundEnable) serialWrite(smartAudioSerialPort, 0x00);
510511

511512
sa_lastTransmissionMs = millis();
512513
saStat.pktsent++;

0 commit comments

Comments
 (0)