holiday-lights/test.cpp

17 lines
339 B
C++
Raw Normal View History

2020-11-28 20:23:35 -07:00
#include <stdio.h>
#include "morse.h"
// gcc -D test_main=main -o test morse.cpp test.cpp && ./test
int test_main(int argc, char *argv[]) {
MorseEncoder enc = MorseEncoder("SOS ck ck \x03");
2020-11-28 20:23:35 -07:00
while (enc.Tick()) {
if (enc.Transmitting) {
printf("#");
} else {
printf(" ");
}
}
printf("\n");
}