Moved sniff to separate sub-project
This commit is contained in:
parent
fa85202c3d
commit
35d3428321
3 changed files with 14 additions and 10 deletions
13
source/sniff/CMakeLists.txt
Normal file
13
source/sniff/CMakeLists.txt
Normal file
|
@ -0,0 +1,13 @@
|
|||
project(Sniff)
|
||||
cmake_minimum_required(VERSION 3.6)
|
||||
|
||||
add_executable(${PROJECT_NAME}
|
||||
sniff.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
sniffer
|
||||
rc-switch
|
||||
wiringPi
|
||||
)
|
||||
|
22
source/sniff/sniff.cpp
Normal file
22
source/sniff/sniff.cpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
#include "sniffer.h"
|
||||
#include <iostream>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
std::cout << "Sniff" << std::endl;
|
||||
|
||||
Sniffer sniffer(6);
|
||||
|
||||
while (true)
|
||||
{
|
||||
unsigned int data = sniffer.receive();
|
||||
if (data != 0)
|
||||
{
|
||||
std::cout << "Data: " << data << std::endl;
|
||||
}
|
||||
|
||||
delay(100);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue