Complete functionality

This commit is contained in:
小冯Sir 2024-05-04 05:19:09 +08:00
parent ed0b07c2e0
commit da901cc0f4
2 changed files with 15 additions and 1 deletions

View File

@ -71,6 +71,9 @@ void Error_Handler(void);
#define KEY2_Pin GPIO_PIN_1
#define KEY2_GPIO_Port GPIOA
#define KEY2_EXTI_IRQn EXTI1_IRQn
#define SENOR_Pin GPIO_PIN_3
#define SENOR_GPIO_Port GPIOA
#define SENOR_EXTI_IRQn EXTI3_IRQn
#define KEY3_Pin GPIO_PIN_4
#define KEY3_GPIO_Port GPIOA
#define KEY3_EXTI_IRQn EXTI4_IRQn

View File

@ -111,15 +111,26 @@ int main(void)
WS_TFT_Init();
HAL_UARTEx_ReceiveToIdle_DMA(&huart1,cmdBuffer, sizeof(cmdBuffer));
__HAL_DMA_DISABLE_IT(&hdma_usart1_rx,DMA_IT_HT);
printf("System Init OK!\r\n");
Staring_Menu();
taxiSystemInit();
uint8_t menuFlag = 0;
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1) {
user_Menu();
if(keyVal == 2 && (getChangeFlag() == 0)){
menuFlag++;
WS_TFT_Clear(WHITE);
keyVal = 0;
}
if(menuFlag == 0) user_Menu();
else if(menuFlag == 1) changePriceMenu();
else menuFlag = 0;
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */