diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..206bef54 --- /dev/null +++ b/Makefile @@ -0,0 +1,32 @@ +prefix=/usr +CC=gcc + +CFLAGS=`pkg-config --cflags gtk+-3.0` -Wall -pedantic -std=gnu11 -fstack-protector -O3 +LDFLAGS=`pkg-config --libs gtk+-3.0` -lwiringPi -lasound -lm -lfftw3 -lfftw3f -pthread -lncurses -lsqlite3 + +all: sbitx + +SOURCES=vfo.c si570.c sbitx_sound.c fft_filter.c sbitx_gtk.c sbitx_utils.c i2cbb.c si5351v2.c ini.c hamlib.c queue.c modems.c logbook.c telnet.c macros.c modem_ft8.c remote.c mongoose.c webserver.c sbitx.c modem_cw.c settings_ui.c + +OBJ=$(SOURCES:.c=.o) + +.c.o: + $(CC) -c $(CFLAGS) $< -o $@ + +ft8_lib/libft8.a: + $(MAKE) -C ft8_lib + $(AR) rc ft8_lib/libft8.a ft8_lib/ft8/constants.o ft8_lib/ft8/encode.o ft8_lib/ft8/pack.o ft8_lib/ft8/text.o ft8_lib/common/wave.o ft8_lib/ft8/crc.o ft8_lib/fft/kiss_fftr.o ft8_lib/fft/kiss_fft.o ft8_lib/ft8/decode.o ft8_lib/ft8/ldpc.o ft8_lib/ft8/unpack.o + +sbitx: $(OBJ) ft8_lib/libft8.a + $(CC) -o $@ $^ $(LDFLAGS) + +.PHONY: clean install + +install: sbitx + mkdir -p /home/pi/sbitx/audio + mkdir -p /home/pi/sbitx/data + mkdir -p /home/pi/sbitx/web + sqlite3 /home/pi/sbitx/data/sbitx.db < data/create_db.sql + +clean: + rm -rf sbitx *.o ft8_lib/*.o ft8_lib/ft8/*.o ft8_lib/libft8.a diff --git a/README.md b/README.md new file mode 100644 index 00000000..527da103 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +This is a fork of Farhan's sBitx reference implementation software with minimal changes, just enough to make it compile and run fine on recent Linux and Raspberry Pi versions. + +Use this fork with a recent WiringPi version for Raspberry Pi 5 support: https://github.com/WiringPi/WiringPi/releases + +Install instructions are in [install.txt](install.txt) file. + +For a simple I/O-only (no DSP) software for sBitx, use: https://github.com/Rhizomatica/sbitx-core + +For a stable and sane headless sBitx software implementation, look at: https://github.com/Rhizomatica/hermes-net/tree/main/trx_v2-userland diff --git a/build b/build index a49d1850..48331f1d 100755 --- a/build +++ b/build @@ -31,6 +31,12 @@ else VERSION=`grep VER sdr_ui.h|awk 'FNR==1{print $4}'|sed -e 's/"//g'` echo "compiling $F version $VERSION in $WORKING_DIRECTORY" fi + +cd ft8_lib +make +ar rc libft8.a ft8/constants.o ft8/encode.o ft8/pack.o ft8/text.o common/wave.o ft8/crc.o fft/kiss_fftr.o fft/kiss_fft.o ft8/decode.o ft8/ldpc.o ft8/unpack.o +cd .. + gcc -g -o $F \ vfo.c si570.c sbitx_sound.c fft_filter.c sbitx_gtk.c sbitx_utils.c \ i2cbb.c si5351v2.c ini.c hamlib.c queue.c modems.c logbook.c \ diff --git a/ft8_lib/libft8.a b/ft8_lib/libft8.a deleted file mode 100644 index 63f441b9..00000000 Binary files a/ft8_lib/libft8.a and /dev/null differ diff --git a/ft8_lib/test b/ft8_lib/test deleted file mode 100755 index f236f69a..00000000 Binary files a/ft8_lib/test and /dev/null differ diff --git a/sbitx b/sbitx deleted file mode 100755 index e2347145..00000000 Binary files a/sbitx and /dev/null differ diff --git a/sbitx_gtk.c b/sbitx_gtk.c index 50038d1d..acd6f23f 100644 --- a/sbitx_gtk.c +++ b/sbitx_gtk.c @@ -2146,7 +2146,10 @@ static gboolean on_draw_event( GtkWidget* widget, cairo_t *cr, gpointer user_dat static gboolean on_resize(GtkWidget *widget, GdkEventConfigure *event, gpointer user_data) { screen_width = event->width; - screen_height = event->height; + if (event->height < 430) + screen_height = 430; + else + screen_height = event->height; // gtk_container_resize_children(GTK_CONTAINER(window)); // gtk_widget_set_default_size(display_area, screen_width, screen_height); layout_ui(); diff --git a/sbitx_wisdom.wis b/sbitx_wisdom.wis deleted file mode 100644 index 51af5e18..00000000 --- a/sbitx_wisdom.wis +++ /dev/null @@ -1,6 +0,0 @@ -(fftw-3.3.8 fftw_wisdom #x4be12fff #x7b2df9b2 #xa5975329 #x385b0041 - (fftw_codelet_n1_64 0 #x11bdd #x11bdd #x0 #x4ef0a182 #x3d09d6da #x67d22419 #x45f3912c) - (fftw_codelet_t1_32 0 #x11bdd #x11bdd #x0 #x354ca45e #xce4b79d1 #x8eb6b593 #xd934b409) - (fftw_codelet_t1_32 0 #x11bdd #x11bdd #x0 #x70e66484 #x7eff6a73 #xbb60a04e #x5fa306c6) - (fftw_codelet_n1_64 0 #x11bdd #x11bdd #x0 #xb2c346b0 #x93ceae04 #x82e0f487 #x28187000) -) diff --git a/sbitx_wisdom_f.wis b/sbitx_wisdom_f.wis deleted file mode 100644 index 5d713e88..00000000 --- a/sbitx_wisdom_f.wis +++ /dev/null @@ -1,13 +0,0 @@ -(fftw-3.3.8 fftwf_wisdom #x4a633eef #xb5a95564 #x91014bdd #x9c85ce5f - (fftwf_dft_r2hc_register 0 #x11bdd #x11bdd #x0 #x0f8ee19b #x9eb1f770 #x11176ad4 #x83794646) - (fftwf_dft_nop_register 0 #x11bdd #x11bdd #x0 #xe7bce40e #x3ceb06af #x94d8a0db #xc7063f0a) - (fftwf_dft_buffered_register 0 #x11bdd #x11bdd #x0 #xee2537c6 #x883c9798 #x27a1767d #x0270d960) - (fftwf_dft_buffered_register 0 #x11bdd #x11bdd #x0 #xd41ab062 #x64eaa976 #x5994b4cb #xa3057fc9) - (fftwf_codelet_t2bv_32_neon 0 #x10bdd #x10bdd #x0 #x52c16d5c #x78672292 #xb152d1c2 #x86ccca81) - (fftwf_codelet_t2fv_32_neon 0 #x10bdd #x10bdd #x0 #xeab40192 #xd605d0ea #x33acdc5e #xd87ce2ac) - (fftwf_codelet_n2fv_64_neon 0 #x10bdd #x10bdd #x0 #xba089caf #x68d3adae #xde77a636 #x8bcec5e1) - (fftwf_dft_nop_register 0 #x11bdd #x11bdd #x0 #xc9e6246b #xea7f1b0f #x93cd92dc #x742f0577) - (fftwf_dft_r2hc_register 0 #x11bdd #x11bdd #x0 #xb9163f47 #x81507538 #x66941050 #x3a4f1f1b) - (fftwf_codelet_n2bv_64_neon 0 #x10bdd #x10bdd #x0 #xe10a4f89 #x79f5831f #x6ad85b28 #x06b20bf5) - (fftwf_rdft_rank0_register 0 #x11bdd #x11bdd #x0 #x069c2c48 #xc54130cd #xdbd4f565 #x08718a86) -)