Merge pull request #989 from aaronchch/aaronchch/heli_issue_934
Aaronchch/heli issue 934
This commit is contained in:
@@ -1188,6 +1188,7 @@ PACK(typedef struct t_MavlinkData {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum SwashType {
|
enum SwashType {
|
||||||
|
SWASH_TYPE_NONE,
|
||||||
SWASH_TYPE_120,
|
SWASH_TYPE_120,
|
||||||
SWASH_TYPE_120X,
|
SWASH_TYPE_120X,
|
||||||
SWASH_TYPE_140,
|
SWASH_TYPE_140,
|
||||||
|
|||||||
+12
-5
@@ -983,9 +983,9 @@ void applyExpos(int16_t *anas, uint8_t mode APPLY_EXPOS_EXTRA_PARAMS)
|
|||||||
if (ed->srcRaw == ovwrIdx)
|
if (ed->srcRaw == ovwrIdx)
|
||||||
v = ovwrValue;
|
v = ovwrValue;
|
||||||
#if defined(HELI)
|
#if defined(HELI)
|
||||||
else if (ed->srcRaw == MIXSRC_Ele && g_model.swashR.value)
|
else if (ed->srcRaw == MIXSRC_Ele)
|
||||||
v = heliAnas[ELE_STICK];
|
v = heliAnas[ELE_STICK];
|
||||||
else if (ed->srcRaw == MIXSRC_Ail && g_model.swashR.value)
|
else if (ed->srcRaw == MIXSRC_Ail)
|
||||||
v = heliAnas[AIL_STICK];
|
v = heliAnas[AIL_STICK];
|
||||||
#endif
|
#endif
|
||||||
else {
|
else {
|
||||||
@@ -1035,6 +1035,13 @@ void applyExpos(int16_t *anas, uint8_t mode APPLY_EXPOS_EXTRA_PARAMS)
|
|||||||
virtualInputsTrims[cur_chn] = ed->srcRaw - MIXSRC_Rud;
|
virtualInputsTrims[cur_chn] = ed->srcRaw - MIXSRC_Rud;
|
||||||
else
|
else
|
||||||
virtualInputsTrims[cur_chn] = -1;
|
virtualInputsTrims[cur_chn] = -1;
|
||||||
|
|
||||||
|
#if defined(HELI)
|
||||||
|
if (ed->srcRaw == MIXSRC_Ele)
|
||||||
|
heliAnas[ELE_STICK] = v;
|
||||||
|
else if (ed->srcRaw == MIXSRC_Ail)
|
||||||
|
heliAnas[AIL_STICK] = v;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
anas[cur_chn] = v;
|
anas[cur_chn] = v;
|
||||||
@@ -3200,10 +3207,10 @@ void evalInputs(uint8_t mode)
|
|||||||
#if defined(HELI)
|
#if defined(HELI)
|
||||||
if (d && (ch==ELE_STICK || ch==AIL_STICK)) {
|
if (d && (ch==ELE_STICK || ch==AIL_STICK)) {
|
||||||
v = (int32_t(v) * calc100toRESX(g_model.swashR.value)) / int32_t(d);
|
v = (int32_t(v) * calc100toRESX(g_model.swashR.value)) / int32_t(d);
|
||||||
#if defined(PCBTARANIS)
|
|
||||||
heliAnas[ch] = v;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#if defined(PCBTARANIS)
|
||||||
|
heliAnas[ch] = v;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(PCBTARANIS)
|
#if !defined(PCBTARANIS)
|
||||||
|
|||||||
Reference in New Issue
Block a user