X-Git-Url: https://git.realraum.at/?a=blobdiff_plain;f=rf433rcv%2Fpc.cpp;h=6f43debf7f3a990a7657337d977a37e1e4dc81b9;hb=f9fae2d19cba2d5f0921d57170f4124ce49e7b8e;hp=53ef05aa256969254986e5cdb6df376b06c12cb9;hpb=d1cb582de8efadfa0ca4a26e872d813f6d5a1571;p=svn42.git diff --git a/rf433rcv/pc.cpp b/rf433rcv/pc.cpp index 53ef05a..6f43deb 100644 --- a/rf433rcv/pc.cpp +++ b/rf433rcv/pc.cpp @@ -4,33 +4,20 @@ int main() { unsigned char c =0; unsigned char sym =0; - unsigned char old_sym =0; - int counter = 0; - while( 1) + int counter = 1000; + while( counter--) { std::cin >> c; for(int i = 0; i<8; i++) { sym = c & (1<<7); - if (sym == old_sym) - { - counter++; - } else { - if (counter > 30 ) - { - std::cout << std::endl; - } - counter = 0; - } - if( sym) { - std::cout << 'X'; + std::cout << "1,"; } else { - std::cout << '_'; + std::cout << "0,"; } c<<=1; - old_sym=sym; } } }