From 2ff1a075b23acd1476bf5333a8f47f40756c6edc Mon Sep 17 00:00:00 2001 From: 3djc Date: Thu, 13 Oct 2016 10:13:29 +0200 Subject: [PATCH 1/3] Display XJT latency on Horus --- radio/src/gui/480x272/model_setup.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/radio/src/gui/480x272/model_setup.cpp b/radio/src/gui/480x272/model_setup.cpp index f5ffe3eec..d497e6770 100644 --- a/radio/src/gui/480x272/model_setup.cpp +++ b/radio/src/gui/480x272/model_setup.cpp @@ -784,6 +784,12 @@ bool menuModelSetup(event_t event) drawStringWithIndex(MODEL_SETUP_2ND_COLUMN, y, STR_CH, moduleData.channelsStart+1, menuHorizontalPosition==0 ? attr : 0); lcdDrawText(lcdNextPos+5, y, "-"); drawStringWithIndex(lcdNextPos+5, y, STR_CH, moduleData.channelsStart+NUM_CHANNELS(moduleIdx), menuHorizontalPosition==1 ? attr : 0); + if (IS_MODULE_XJT(moduleIdx)) { + if (NUM_CHANNELS(moduleIdx) > 8) + lcdDrawText(lcdNextPos+15, y, "(18ms)"); + else + lcdDrawText(lcdNextPos+15, y, "(9ms)"); + } if (attr && s_editMode>0) { switch (menuHorizontalPosition) { case 0: From 233ce403dee7f51fac1eb7c4a70b6b4eeabc536f Mon Sep 17 00:00:00 2001 From: 3djc Date: Thu, 13 Oct 2016 10:22:56 +0200 Subject: [PATCH 2/3] XJT lat for Taranis --- radio/src/gui/212x64/model_setup.cpp | 6 ++++++ radio/src/gui/480x272/model_setup.cpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/radio/src/gui/212x64/model_setup.cpp b/radio/src/gui/212x64/model_setup.cpp index 6849e8ac0..a709575b1 100644 --- a/radio/src/gui/212x64/model_setup.cpp +++ b/radio/src/gui/212x64/model_setup.cpp @@ -853,6 +853,12 @@ void menuModelSetup(event_t event) lcdDrawNumber(lcdLastPos, y, moduleData.channelsStart+1, LEFT | (menuHorizontalPosition==0 ? attr : 0)); lcdDrawChar(lcdLastPos, y, '-'); lcdDrawNumber(lcdLastPos + FW+1, y, moduleData.channelsStart+NUM_CHANNELS(moduleIdx), LEFT | (menuHorizontalPosition==1 ? attr : 0)); + if (IS_MODULE_XJT(moduleIdx) && g_model.moduleData[INTERNAL_MODULE].rfProtocol== 0) { + if (NUM_CHANNELS(moduleIdx) > 8) + lcdDrawText(lcdLastPos+5, y, "(18ms)"); + else + lcdDrawText(lcdLastPos+5, y, "(9ms)"); + } if (attr && s_editMode>0) { switch (menuHorizontalPosition) { case 0: diff --git a/radio/src/gui/480x272/model_setup.cpp b/radio/src/gui/480x272/model_setup.cpp index d497e6770..2adeb8c29 100644 --- a/radio/src/gui/480x272/model_setup.cpp +++ b/radio/src/gui/480x272/model_setup.cpp @@ -784,7 +784,7 @@ bool menuModelSetup(event_t event) drawStringWithIndex(MODEL_SETUP_2ND_COLUMN, y, STR_CH, moduleData.channelsStart+1, menuHorizontalPosition==0 ? attr : 0); lcdDrawText(lcdNextPos+5, y, "-"); drawStringWithIndex(lcdNextPos+5, y, STR_CH, moduleData.channelsStart+NUM_CHANNELS(moduleIdx), menuHorizontalPosition==1 ? attr : 0); - if (IS_MODULE_XJT(moduleIdx)) { + if (IS_MODULE_XJT(moduleIdx) && g_model.moduleData[INTERNAL_MODULE].rfProtocol== 0) { if (NUM_CHANNELS(moduleIdx) > 8) lcdDrawText(lcdNextPos+15, y, "(18ms)"); else From 628c7150df09b70de8a92f61b3adf779e3b5adcc Mon Sep 17 00:00:00 2001 From: 3djc Date: Thu, 13 Oct 2016 11:46:19 +0200 Subject: [PATCH 3/3] proper handling of external module --- radio/src/gui/212x64/model_setup.cpp | 2 +- radio/src/gui/480x272/model_setup.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/radio/src/gui/212x64/model_setup.cpp b/radio/src/gui/212x64/model_setup.cpp index a709575b1..7d35b154e 100644 --- a/radio/src/gui/212x64/model_setup.cpp +++ b/radio/src/gui/212x64/model_setup.cpp @@ -853,7 +853,7 @@ void menuModelSetup(event_t event) lcdDrawNumber(lcdLastPos, y, moduleData.channelsStart+1, LEFT | (menuHorizontalPosition==0 ? attr : 0)); lcdDrawChar(lcdLastPos, y, '-'); lcdDrawNumber(lcdLastPos + FW+1, y, moduleData.channelsStart+NUM_CHANNELS(moduleIdx), LEFT | (menuHorizontalPosition==1 ? attr : 0)); - if (IS_MODULE_XJT(moduleIdx) && g_model.moduleData[INTERNAL_MODULE].rfProtocol== 0) { + if (IS_MODULE_XJT(moduleIdx) && g_model.moduleData[moduleIdx].rfProtocol== RF_PROTO_X16) { if (NUM_CHANNELS(moduleIdx) > 8) lcdDrawText(lcdLastPos+5, y, "(18ms)"); else diff --git a/radio/src/gui/480x272/model_setup.cpp b/radio/src/gui/480x272/model_setup.cpp index 2adeb8c29..4273cf0d7 100644 --- a/radio/src/gui/480x272/model_setup.cpp +++ b/radio/src/gui/480x272/model_setup.cpp @@ -784,7 +784,7 @@ bool menuModelSetup(event_t event) drawStringWithIndex(MODEL_SETUP_2ND_COLUMN, y, STR_CH, moduleData.channelsStart+1, menuHorizontalPosition==0 ? attr : 0); lcdDrawText(lcdNextPos+5, y, "-"); drawStringWithIndex(lcdNextPos+5, y, STR_CH, moduleData.channelsStart+NUM_CHANNELS(moduleIdx), menuHorizontalPosition==1 ? attr : 0); - if (IS_MODULE_XJT(moduleIdx) && g_model.moduleData[INTERNAL_MODULE].rfProtocol== 0) { + if (IS_MODULE_XJT(moduleIdx) && g_model.moduleData[moduleIdx].rfProtocol== RF_PROTO_X16) { if (NUM_CHANNELS(moduleIdx) > 8) lcdDrawText(lcdNextPos+15, y, "(18ms)"); else