**** NOTE THAN THE MARK AND SPACE FREQUENCIES ARE BACKWARDS in gen_tone.c.
Lines 228-229 correctly set f1_change_per_sample to the MARK frequency and
f2_change_per_sample the space frequency.
Line 383, however, sends MARK on 0 and SPACE on 1:
tone_phase[chan] += dat ? f2_change_per_sample[chan] : f1_change_per_sample[chan];
As such, you have to generate packets like this:
gen_packets -e R -m 1800 -s 1200 -o test.wav eotd.data
EOTD input to the program consists of lines of 8 byte packets in HCB+ATAD
format; i.e. the format that direwolf appends to the decoded packet.
Ex: 81 b0 32 fb 31 23 73 8f
A new option has been added to atest: -e type. That enables EOTD generation and
the 'type' signifies 'R'ear to front or 'F'ront to rear decoding.
Using "atest -B EOTD test.wav" the above packet decodes to:
DECODED[1] 0:00.123 EOTD audio level = 49(30/31)
[0] EOTD>APDW16:{DRREAR>FRONT:ts=2022-04-07T10:02:00.350,chain=ONLY,block=BASIC,devbat=OK,msgid=ONEWAY,unit_addr=18151,brake_status=GO(49 psig),disc_bits=f6,valve=OPERATIONAL,confirm=UPDATE,disc_bit_1=1,motion=STOPPED/NOT_MONITORED,light_batt=OK/NOT_MONITORED,light=ON,hex=81 b0 32 fb 31 23 73 8f
to create ZIP package run
cpack
to add new generator modify CPACK_GENERATOR variable.
NOTE: pay attention on CPU flags optimization when you redistribuite
the package (segmentation fault)
works with cygwin and x86_64-w64-mingw32-gcc/x86_64-w64-mingw32-g++
from the package installer of cygwin.
To use that add the following lines to .bash_profile
export CC=x86_64-w64-mingw32-gcc
export CXX=x86_64-w64-mingw32-g++
you also need cmake from cygwin
the new tests are implemented with CTest suite of CMake.
To enable the tests you need to run cmake with -DBUILD_TESTING=ON
There are optional tests (that might not work) that can be enabled with
-DOPTIONAL_TEST=ON
So, to enable all tests and run it use the following command
mkdir build
cmake -DBUILD_TESTING=ON -DOPTIONA_TEST=ON ..
make
ctest
to debug the errors use
ctest --debug
You can always find all tests binary on build/test/
Implementation:
- check-modem* tests are implemented with shell script because it
requires to execute many commands and therefore will be easy to
manage. The file is configured at configuration time.
- for single binary we verify the exit status (default = 0) so you
only need to build the binary and add it to add_test()
this step unify the builing system for all platforms (windows, linux,
osx and *BSD)
* Requirements:
- gcc/clang (C/C++ compiler) (in debian build-essential)
- cmake (in debian cmake)
- git if you build from source (in debian git)
- posix threads
** Requirements on *BSD/macOS:
- portaudio
** Optional Requirements:
- gpsd (in debian libgps-dev)
- libhamlib (in debian libhamlib-dev)
** Optional Requirements in Linux
- udev (in debian libudev-dev)
- alsa (in debian libasound2-dev)
* Main changes:
- version is now set only on CMakeLists.txt and automatically used
on the code
- cpu flags are auto-discovered in the default build and it works
on gcc/clang/msvc on x86/x86_64/arm; you can force cpu flags with
-DFORCE_SSE=1 for example (see CMakeLists.txt on root)
- use a more "complex" tag on generic.conf to facilitate parsing
by cmake (not more platform dependent). Now it is %C% or %R% for
example
- target `tocalls-symbols` is now called `data-update`
- created debian/ directory to contains files to use debuild
* Example to build:
mkdir build && cd build
cmake ..
make
make install
make install-conf
then you have the binary files on src/ and in the system directory
* CMake options (see the head of CMakeLists.txt)
- FORCE_SSE force sse instruction
- FORCE_SSSE3 force ssse3 instruction
- FORCE_SSE41 force ssse4.1 instruction
- OPTIONAL_TEST compile optional test (might be broken)
- BUILD_TESTING enable tests (ctest framework)
- CMAKE_INSTALL_PREFIX if you want to change your install path
prefix
for example:
cmake .. -DOPTIONAL_TEST=ON