Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //══════════════════════════════════════════════════════════════════════════════════════════════════════//
- // Přepínač provozní diagnostiky //
- // Funkce pro ovládání diagnostiky, má dva vstupní parametry : 1) Pin PISO registru, na který je přepínač připojen //
- // 2) CVID - trojznak definovaný v programu TStoCOM //
- // Funkce posílá pomocí sériové linky hodnotu 0 nebo 1 (násobitel je 1) //
- //══════════════════════════════════════════════════════════════════════════════════════════════════════//
- int aktualStavDiagnostiky = 0;
- int staryStavDiagnostiky[POCET_VSTUPU];
- //══════════════════════════════════════════════════════════════════════════════════════════════════════//
- void Diagnostika(int pointer, String CVID) {
- if(tlacitko[pointer] != staryStavDiagnostiky[pointer])
- {
- if(tlacitko[pointer] == 1) {
- Serial.print(CVID);
- Serial.print("1");
- Serial.print("\r\n");
- }
- else if(tlacitko[pointer] == 0) {
- Serial.print(CVID);
- Serial.print("0");
- Serial.print("\r\n");
- }
- else {
- Serial.print("Chybna poloha přepínače diagnostiky!");
- Serial.print("\r\n");
- }
- staryStavDiagnostiky[pointer] = tlacitko[pointer];
- }
- }
- //══════════════════════════════════════════════════════════════════════════════════════════════════════//
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement