mirror of
https://github.com/opentx/opentx.git
synced 2025-07-26 17:55:19 +03:00
Spectrum analyser reworked (#6836)
* Spectrum analyser reworked * Fix typo * Cosmetics * Cosmetics * yet another overall look update * T16 compilations fixes * Various Taranis compile fixes * Cosmetics * Cosmetics * Cosmetics * Cosmetics fixes
This commit is contained in:
parent
7094a744d6
commit
891c13e98d
16 changed files with 284 additions and 131 deletions
|
@ -37,7 +37,7 @@ void sendChannels(uint8_t moduleIdx);
|
|||
|
||||
static void sendMulti(uint8_t moduleIdx, uint8_t b)
|
||||
{
|
||||
#if defined(INTERNAL_MODULE_MULTI)
|
||||
#if defined(HARDWARE_INTERNAL_MODULE)
|
||||
if (moduleIdx == INTERNAL_MODULE) {
|
||||
intmodulePulsesData.multi.sendByte(b);
|
||||
}
|
||||
|
@ -171,6 +171,15 @@ void sendFrameProtocolHeader(uint8_t moduleIdx, bool failsafe)
|
|||
int8_t optionValue = g_model.moduleData[moduleIdx].multi.optionValue;
|
||||
|
||||
uint8_t protoByte = 0;
|
||||
|
||||
if (moduleState[moduleIdx].mode == MODULE_MODE_SPECTRUM_ANALYSER) {
|
||||
sendMulti(moduleIdx, (uint8_t) 0x54); // Header byte
|
||||
sendMulti(moduleIdx, (uint8_t) 54); // Spectrum custom protocol
|
||||
sendMulti(moduleIdx, (uint8_t) 0);
|
||||
sendMulti(moduleIdx, (uint8_t) 0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (moduleState[moduleIdx].mode == MODULE_MODE_BIND)
|
||||
protoByte |= MULTI_SEND_BIND;
|
||||
else if (moduleState[moduleIdx].mode == MODULE_MODE_RANGECHECK)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue