PowerTGS440

Untitled

Mar 23rd, 2021
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.66 KB | None | 0 0
  1. // =========================================================================================================== //
  2. // Plik : tools.h //
  3. // Wersja : 0.02 Beta //
  4. // Data : 04.03.2021 //
  5. // Autor : Tomasz Majcher (TransLine Polska) //
  6. // E-Mail : [email protected] ///
  7. // =========================================================================================================== //
  8. // === H I S T O R I A === V E R S I O N H I S T O R Y ==================================================== //
  9. // =========================================================================================================== //
  10. //
  11. //
  12. // wersja 0.02 BETA (10.03.2021) - rozbudowa funkcji PokazZasobySystemowe
  13. // wersja 0.01 BETA (04.03.2021) - funckje narzędziowe
  14. //
  15. // =========================================================================================================== //
  16. // === S E K C J A D E F I N E ============================================================================ //
  17. // =========================================================================================================== //
  18.  
  19. #define TRUE 1 // deklaracja i definicja stałej TRUE
  20. #define FALSE 0 // deklaracja i definicja stałej FALSE
  21. #define DEBUG_LEV_1 TRUE // deklaracja i definicja DEBUG'era Level 1
  22. #define DEBUG_LEV_2 TRUE // deklaracja i definicja DEBUG'era Level 2
  23.  
  24.  
  25. // =========================================================================================================== //
  26. // === S E K C J A I N C L U D E ========================================================================== //
  27. // =========================================================================================================== //
  28.  
  29.  
  30.  
  31. // =========================================================================================================== //
  32. // === F U N K C J E === F U N C T I O N S =================================================================== //
  33. // =========================================================================================================== //
  34.  
  35.  
  36. // =========================================================================================================== //
  37. // === KLASA Tools =========================================================================================== //
  38. // =========================================================================================================== //
  39.  
  40. class Tools
  41. {
  42. private:
  43.  
  44. // --- funkcje i zmienne prywatne ------------------------------------------------------------ //
  45.  
  46. public:
  47.  
  48. // --- funkcje i zmienne publiczne ----------------------------------------------------------- //
  49.  
  50. void PokazZasobySystemowe(const char * wiadomosc);
  51. void PokazZasobySystemowe(const char * wiadomosc, uint16_t czekaj);
  52. void PokazPredkoscTerminala(const char * wiadomosc, int p);
  53. void PokazWiadomosc(const char * wiadomosc_1);
  54. void PokazWiadomosc(const char * wiadomosc_1, int16_t czekaj);
  55. void PokazWiadomosc(const char * wiadomosc_1, const char * wiadomosc_2);
  56. void PokazWiadomosc(const char * wiadomosc_1, const char * wiadomosc_2, const char * wiadomosc_3);
  57. };
  58.  
  59. // =========================================================================================================== //
  60. // === Funkcje Publiczne klasy Tools ========================================================================= //
  61. // =========================================================================================================== //
  62. //
  63. //
  64. //
  65. //
  66. //
  67. //
  68. // ----------------------------------------------------------------------------------------------------------- //
  69. // --- Pokaz prędkość terminala ------------------------------------------------------------------------------ //
  70. // ----------------------------------------------------------------------------------------------------------- //
  71.  
  72. void Tools :: PokazPredkoscTerminala(const char * wiadomosc, int p)
  73. {
  74. Serial.printf("\n--------------------------------------------------------");
  75. Serial.printf("\n[ESP] [TERMINAL] - Prędkość terminala %s ustawiona na %s baud", wiadomosc, p);
  76. }
  77.  
  78. // ----------------------------------------------------------------------------------------------------------- //
  79. // --- Pokaz napis ------------------------------------------------------------------------------------------- //
  80. // ----------------------------------------------------------------------------------------------------------- //
  81.  
  82. void Tools :: PokazWiadomosc(const char * wiadomosc_1)
  83. {
  84. Serial.printf("\n%s", wiadomosc_1);
  85. }
  86.  
  87. // ----------------------------------------------------------------------------------------------------------- //
  88. // --- Pokaz napis ------------------------------------------------------------------------------------------- //
  89.  
  90. void Tools :: PokazWiadomosc(const char * wiadomosc_1, int16_t czekaj)
  91. {
  92. Serial.printf("%s", wiadomosc_1);
  93. delay(czekaj);
  94. }
  95.  
  96. // ----------------------------------------------------------------------------------------------------------- //
  97. // --- Pokaz napis ------------------------------------------------------------------------------------------- //
  98. // ----------------------------------------------------------------------------------------------------------- //
  99.  
  100. void Tools :: PokazWiadomosc(const char * wiadomosc_1, const char * wiadomosc_2)
  101. {
  102. Serial.printf("\n[%s] %s", wiadomosc_1, wiadomosc_2);
  103. }
  104.  
  105. // ----------------------------------------------------------------------------------------------------------- //
  106. // --- Pokaz napis ------------------------------------------------------------------------------------------- //
  107. // ----------------------------------------------------------------------------------------------------------- //
  108.  
  109. void Tools :: PokazWiadomosc(const char * wiadomosc_1, const char * wiadomosc_2, const char * wiadomosc_3)
  110. {
  111. Serial.printf("\n[%s] [%s] %s", wiadomosc_1, wiadomosc_2, wiadomosc_3);
  112. }
  113.  
  114. // ----------------------------------------------------------------------------------------------------------- //
  115.  
Advertisement
Add Comment
Please, Sign In to add comment