Latency measured on X10

This commit is contained in:
Bertrand Songis
2019-07-15 19:09:39 +02:00
parent f7daadc921
commit 0b34a14a55
3 changed files with 17 additions and 1 deletions
+1 -1
View File
@@ -220,7 +220,7 @@ void menuStatisticsDebug(event_t event)
y += FH;
#endif
lcdDrawText(LCD_W/2, 7*F&H+1, STR_MENUTORESET, CENTERED);
lcdDrawText(LCD_W/2, 7*FH+1, STR_MENUTORESET, CENTERED);
lcdInvertLastLine();
}
+8
View File
@@ -92,10 +92,18 @@ void watchdogSuspend(uint32_t timeout)
void toggleLatencySwitch()
{
latencyToggleSwitch ^= 1;
#if defined(PCBHORUS)
if (latencyToggleSwitch)
GPIO_ResetBits(EXTMODULE_TX_GPIO, EXTMODULE_TX_GPIO_PIN);
else
GPIO_SetBits(EXTMODULE_TX_GPIO, EXTMODULE_TX_GPIO_PIN);
#else
if (latencyToggleSwitch)
sportUpdatePowerOn();
else
sportUpdatePowerOff();
#endif
}
#endif
@@ -30,6 +30,14 @@ void extmoduleStop()
EXTMODULE_DMA_STREAM->CR &= ~DMA_SxCR_EN; // Disable DMA
EXTMODULE_TIMER->DIER &= ~(TIM_DIER_CC2IE | TIM_DIER_UDE);
EXTMODULE_TIMER->CR1 &= ~TIM_CR1_CEN;
GPIO_InitTypeDef GPIO_InitStructure;
GPIO_InitStructure.GPIO_Pin = EXTMODULE_TX_GPIO_PIN;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_Init(EXTMODULE_TX_GPIO, &GPIO_InitStructure);
}
void extmodulePpmStart()