[X9D] Telemetry view
SIMU compilation
This commit is contained in:
@@ -1163,6 +1163,27 @@ enum FrskyViews {
|
|||||||
|
|
||||||
static uint8_t s_frsky_view = e_frsky_custom_screen_1;
|
static uint8_t s_frsky_view = e_frsky_custom_screen_1;
|
||||||
|
|
||||||
|
#if LCD_W == 212
|
||||||
|
void displayRssiLine()
|
||||||
|
{
|
||||||
|
if (frskyStreaming > 0) {
|
||||||
|
lcd_hline(0, 55, 212, 0); // separator
|
||||||
|
uint8_t rssi = min((uint8_t)99, frskyData.rssi[1].value);
|
||||||
|
lcd_putsLeft(7*FH+1, STR_TX); lcd_outdezNAtt(4*FW, 7*FH+1, rssi, LEADING0, 2);
|
||||||
|
lcd_rect(25, 57, 78, 7);
|
||||||
|
lcd_filled_rect(26, 58, 17*rssi/33, 5, (rssi < getRssiAlarmValue(0)) ? DOTTED : SOLID);
|
||||||
|
rssi = min((uint8_t)99, frskyData.rssi[0].value);
|
||||||
|
lcd_puts(190, 7*FH+1, STR_RX); lcd_outdezNAtt(189+4*FW-1, 7*FH+1, rssi, LEADING0, 2);
|
||||||
|
lcd_rect(110, 57, 78, 7);
|
||||||
|
uint8_t v = 17*rssi/33;
|
||||||
|
lcd_filled_rect(111+76-v, 58, v, 5, (rssi < getRssiAlarmValue(0)) ? DOTTED : SOLID);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
lcd_putsAtt(7*FW, 7*FH+1, STR_NODATA, BLINK);
|
||||||
|
lcd_status_line();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
void displayRssiLine()
|
void displayRssiLine()
|
||||||
{
|
{
|
||||||
if (frskyStreaming > 0) {
|
if (frskyStreaming > 0) {
|
||||||
@@ -1182,6 +1203,7 @@ void displayRssiLine()
|
|||||||
lcd_status_line();
|
lcd_status_line();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(FRSKY_HUB)
|
#if defined(FRSKY_HUB)
|
||||||
void displayGpsTime()
|
void displayGpsTime()
|
||||||
|
|||||||
@@ -586,6 +586,8 @@ ErrorStatus RTC_SetTime(uint32_t RTC_Format, RTC_TimeTypeDef* RTC_TimeStruct) {
|
|||||||
ErrorStatus RTC_SetDate(uint32_t RTC_Format, RTC_DateTypeDef* RTC_DateStruct) { return SUCCESS; }
|
ErrorStatus RTC_SetDate(uint32_t RTC_Format, RTC_DateTypeDef* RTC_DateStruct) { return SUCCESS; }
|
||||||
void RTC_GetTime(uint32_t RTC_Format, RTC_TimeTypeDef* RTC_TimeStruct) { }
|
void RTC_GetTime(uint32_t RTC_Format, RTC_TimeTypeDef* RTC_TimeStruct) { }
|
||||||
void RTC_GetDate(uint32_t RTC_Format, RTC_DateTypeDef* RTC_DateStruct) { }
|
void RTC_GetDate(uint32_t RTC_Format, RTC_DateTypeDef* RTC_DateStruct) { }
|
||||||
|
void RTC_TimeStructInit(RTC_TimeTypeDef* RTC_TimeStruct) { }
|
||||||
|
void RTC_DateStructInit(RTC_DateTypeDef* RTC_DateStruct) { }
|
||||||
void PWR_BackupAccessCmd(FunctionalState NewState) { }
|
void PWR_BackupAccessCmd(FunctionalState NewState) { }
|
||||||
void RCC_RTCCLKConfig(uint32_t RCC_RTCCLKSource) { }
|
void RCC_RTCCLKConfig(uint32_t RCC_RTCCLKSource) { }
|
||||||
void RCC_APB1PeriphClockCmd(uint32_t RCC_APB1Periph, FunctionalState NewState) { }
|
void RCC_APB1PeriphClockCmd(uint32_t RCC_APB1Periph, FunctionalState NewState) { }
|
||||||
@@ -596,6 +598,7 @@ FlagStatus USART_GetFlagStatus(USART_TypeDef* USARTx, uint16_t USART_FLAG) { ret
|
|||||||
void GPIO_PinAFConfig(GPIO_TypeDef* GPIOx, uint16_t GPIO_PinSource, uint8_t GPIO_AF) { }
|
void GPIO_PinAFConfig(GPIO_TypeDef* GPIOx, uint16_t GPIO_PinSource, uint8_t GPIO_AF) { }
|
||||||
void USART_Init(USART_TypeDef* USARTx, USART_InitTypeDef* USART_InitStruct) { }
|
void USART_Init(USART_TypeDef* USARTx, USART_InitTypeDef* USART_InitStruct) { }
|
||||||
void USART_Cmd(USART_TypeDef* USARTx, FunctionalState NewState) { }
|
void USART_Cmd(USART_TypeDef* USARTx, FunctionalState NewState) { }
|
||||||
|
void USART_ITConfig(USART_TypeDef* USARTx, uint16_t USART_IT, FunctionalState NewState) { }
|
||||||
void RCC_PLLI2SConfig(uint32_t PLLI2SN, uint32_t PLLI2SR) { }
|
void RCC_PLLI2SConfig(uint32_t PLLI2SN, uint32_t PLLI2SR) { }
|
||||||
void RCC_PLLI2SCmd(FunctionalState NewState) { }
|
void RCC_PLLI2SCmd(FunctionalState NewState) { }
|
||||||
void RCC_I2SCLKConfig(uint32_t RCC_I2SCLKSource) { }
|
void RCC_I2SCLKConfig(uint32_t RCC_I2SCLKSource) { }
|
||||||
|
|||||||
@@ -85,13 +85,14 @@ void sportPutc(const char c)
|
|||||||
GPIO_ResetBits(GPIO_PIN_SPORT_ON, PIN_SPORT_ON);
|
GPIO_ResetBits(GPIO_PIN_SPORT_ON, PIN_SPORT_ON);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(SIMU)
|
||||||
extern "C" void USART2_IRQHandler()
|
extern "C" void USART2_IRQHandler()
|
||||||
{
|
{
|
||||||
uint16_t data;
|
uint16_t data;
|
||||||
|
|
||||||
while(USART_GetFlagStatus(SPORT, USART_FLAG_RXNE)){
|
while(USART_GetFlagStatus(SPORT, USART_FLAG_RXNE)){
|
||||||
data = USART_ReceiveData(SPORT);
|
data = USART_ReceiveData(SPORT);
|
||||||
// debugPutc(data);
|
|
||||||
processSerialData((uint8_t) data);
|
processSerialData((uint8_t) data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user