Aktualizacja klasy TMatrix (14.02.2021) v0.057 gotowa do pobrania!
Plik do pobrania : matrix.h
Dodano 2 metody publiczne:
ShowShortDate(uint8_t dzien, uint8_t miesiac, uint16_t rok);
ShowLongDate(uint8_t dzien_tygodnia, uint8_t dzien, uint8_t miesiac, uint16_t rok);
- // ------------------------------------------------------------------------------------------------------------------------ //
- int TMatrix::ShowShortDate(uint8_t *day, uint8_t *month, uint16_t *year)
- {
- if(isBUSY()) return 0;
- else
- if(P.displayAnimate())
- {
- // --- bufory ----------------- //
- char bufor_main[30]; //
- char bufor_temp[15]; //
- char chtmp[6]; //
- // ---------------------------- //
- sprintf(chtmp, "%d", day);
- strcpy(bufor_main, chtmp);
- MonthExtract(month, bufor_temp, sizeof(bufor_temp)-1);
- strcat(bufor_main, " ");
- strcat(bufor_main, bufor_temp);
- strcat(bufor_main, " ");
- sprintf(chtmp, "%d", year);
- strcat(bufor_main, chtmp);
- P.displayText(bufor_main, PA_CENTER, 20, 0 ,Efect[3].effect, Efect[3].effect);
- }
- return 1;
- }
- // ------------------------------------------------------------------------------------------------------------------------ //
- // metoda wyświetla (scroll w lewo) dzien tygodnia, dzień miesiąca, nazwę miesiąca, rok ----------------------------------- //
- // ------------------------------------------------------------------------------------------------------------------------ //
- int TMatrix::ShowLongDate(uint8_t *day_of_week, uint8_t *day, uint8_t *month, uint16_t *year)
- {
- if(isBUSY()) return 0;
- else
- if(P.displayAnimate())
- {
- // --- bufory ----------------- //
- char bufor_main [60]; //
- char bufor_temp[15]; //
- char chtmp[6]; //
- // ---------------------------- //
- DayExtract(day_of_week, bufor_temp, sizeof(bufor_temp)-1);
- strcpy(bufor_main, bufor_temp);
- strcat(bufor_main, " ");
- sprintf(chtmp, "%d", day);
- strcat(bufor_main, chtmp);
- MonthExtract(month, bufor_temp, sizeof(bufor_temp)-1);
- strcat(bufor_main, " ");
- strcat(bufor_main, bufor_temp);
- strcat(bufor_main, " ");
- sprintf(chtmp, "%d", year);
- strcat(bufor_main, chtmp);
- P.displayText(bufor_main, PA_CENTER, 20, 0 ,Efect[3].effect, Efect[3].effect);
- }
- return 1;
- }
- // ------------------------------------------------------------------------------------------------------------------------ //
Brak komentarzy:
Prześlij komentarz