Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // =========================================================================================================== //
- // Plik : tools.h //
- // Wersja : 0.02 Beta //
- // Data : 04.03.2021 //
- // Autor : Tomasz Majcher (TransLine Polska) //
- // E-Mail : [email protected] ///
- // =========================================================================================================== //
- // === H I S T O R I A === V E R S I O N H I S T O R Y ==================================================== //
- // =========================================================================================================== //
- //
- //
- // wersja 0.02 BETA (10.03.2021) - rozbudowa funkcji PokazZasobySystemowe
- // wersja 0.01 BETA (04.03.2021) - funckje narzędziowe
- //
- // =========================================================================================================== //
- // === S E K C J A D E F I N E ============================================================================ //
- // =========================================================================================================== //
- #define TRUE 1 // deklaracja i definicja stałej TRUE
- #define FALSE 0 // deklaracja i definicja stałej FALSE
- #define DEBUG_LEV_1 TRUE // deklaracja i definicja DEBUG'era Level 1
- #define DEBUG_LEV_2 TRUE // deklaracja i definicja DEBUG'era Level 2
- // =========================================================================================================== //
- // === S E K C J A I N C L U D E ========================================================================== //
- // =========================================================================================================== //
- // =========================================================================================================== //
- // === F U N K C J E === F U N C T I O N S =================================================================== //
- // =========================================================================================================== //
- // =========================================================================================================== //
- // === KLASA Tools =========================================================================================== //
- // =========================================================================================================== //
- class Tools
- {
- private:
- // --- funkcje i zmienne prywatne ------------------------------------------------------------ //
- public:
- // --- funkcje i zmienne publiczne ----------------------------------------------------------- //
- void PokazZasobySystemowe(const char * wiadomosc);
- void PokazZasobySystemowe(const char * wiadomosc, uint16_t czekaj);
- void PokazPredkoscTerminala(const char * wiadomosc, int p);
- void PokazWiadomosc(const char * wiadomosc_1);
- void PokazWiadomosc(const char * wiadomosc_1, int16_t czekaj);
- void PokazWiadomosc(const char * wiadomosc_1, const char * wiadomosc_2);
- void PokazWiadomosc(const char * wiadomosc_1, const char * wiadomosc_2, const char * wiadomosc_3);
- };
- // =========================================================================================================== //
- // === Funkcje Publiczne klasy Tools ========================================================================= //
- // =========================================================================================================== //
- //
- //
- //
- //
- //
- //
- // ----------------------------------------------------------------------------------------------------------- //
- // --- Pokaz prędkość terminala ------------------------------------------------------------------------------ //
- // ----------------------------------------------------------------------------------------------------------- //
- void Tools :: PokazPredkoscTerminala(const char * wiadomosc, int p)
- {
- Serial.printf("\n--------------------------------------------------------");
- Serial.printf("\n[ESP] [TERMINAL] - Prędkość terminala %s ustawiona na %s baud", wiadomosc, p);
- }
- // ----------------------------------------------------------------------------------------------------------- //
- // --- Pokaz napis ------------------------------------------------------------------------------------------- //
- // ----------------------------------------------------------------------------------------------------------- //
- void Tools :: PokazWiadomosc(const char * wiadomosc_1)
- {
- Serial.printf("\n%s", wiadomosc_1);
- }
- // ----------------------------------------------------------------------------------------------------------- //
- // --- Pokaz napis ------------------------------------------------------------------------------------------- //
- void Tools :: PokazWiadomosc(const char * wiadomosc_1, int16_t czekaj)
- {
- Serial.printf("%s", wiadomosc_1);
- delay(czekaj);
- }
- // ----------------------------------------------------------------------------------------------------------- //
- // --- Pokaz napis ------------------------------------------------------------------------------------------- //
- // ----------------------------------------------------------------------------------------------------------- //
- void Tools :: PokazWiadomosc(const char * wiadomosc_1, const char * wiadomosc_2)
- {
- Serial.printf("\n[%s] %s", wiadomosc_1, wiadomosc_2);
- }
- // ----------------------------------------------------------------------------------------------------------- //
- // --- Pokaz napis ------------------------------------------------------------------------------------------- //
- // ----------------------------------------------------------------------------------------------------------- //
- void Tools :: PokazWiadomosc(const char * wiadomosc_1, const char * wiadomosc_2, const char * wiadomosc_3)
- {
- Serial.printf("\n[%s] [%s] %s", wiadomosc_1, wiadomosc_2, wiadomosc_3);
- }
- // ----------------------------------------------------------------------------------------------------------- //
Advertisement
Add Comment
Please, Sign In to add comment