diff --git a/Src/main.c b/Src/main.c index 8e82fb1..084c897 100644 --- a/Src/main.c +++ b/Src/main.c @@ -102,6 +102,7 @@ static void MX_SPI1_Init(void); static void MX_USART1_UART_Init(void); static void MX_RTC_Init(void); /* USER CODE BEGIN PFP */ +void Paint_DrawArray(void); void Paint_DrawTimeArray(void); void Paint_DrawWeekday(void); void Paint_DrawCurrent(uint8_t weekday); @@ -474,6 +475,25 @@ static void MX_GPIO_Init(void) /* USER CODE BEGIN 4 */ +void Paint_DrawArray(){ + for(int i=0; i<7; i++){ + sPaint_time.Hour = sSetStart[i].Hours; + sPaint_time.Min = sSetStart[i].Minutes; + sPaint_time.Sec = sSetStart[i].Seconds; + Paint_ClearWindows(5, i*25 + 5, 5 + Font20.Width * 7, i*25 + 5 + Font20.Height, WHITE); + Paint_DrawTime(5, i*25 + 5, &sPaint_time, &Font20, WHITE, BLACK); + sPaint_time.Hour = sSetEnd[i].Hours; + sPaint_time.Min = sSetEnd[i].Minutes; + sPaint_time.Sec = sSetEnd[i].Seconds; + Paint_ClearWindows(100, i*25 + 5, 100 + Font20.Width * 7, i*25 + 5 + Font20.Height, WHITE); + Paint_DrawTime(100, i*25 + 5, &sPaint_time, &Font20, WHITE, BLACK); + } + for(uint8_t i=0; i<7 ; i++){ + Paint_DrawChar(176,25*i+5,WeekLetter[i][0],&Font20,WHITE,BLACK); + Paint_DrawChar(187,25*i+5,WeekLetter[i][1],&Font20,WHITE,BLACK); + } +} + //keep it short, executed in ISR void ButtonLeft_Pressed(void){ if(system_mode==Choose){