Quisk version 4.2.53
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#ifdef MS_WINDOWS
|
||||
#include <Winsock2.h>
|
||||
#include <windows.h>
|
||||
#include <string.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -105,7 +106,7 @@ static PyObject * open_rx_udp(const char * ip, int port)
|
||||
wVersionRequested = MAKEWORD(2, 2);
|
||||
if (WSAStartup(wVersionRequested, &wsaData) != 0) {
|
||||
sprintf(buf, "Failed to initialize Winsock (WSAStartup)");
|
||||
return PyString_FromString(buf);
|
||||
return PyUnicode_FromString(buf);
|
||||
}
|
||||
#endif
|
||||
// quisk_using_udp = 1;
|
||||
@@ -145,7 +146,7 @@ static PyObject * open_rx_udp(const char * ip, int port)
|
||||
else {
|
||||
sprintf(buf, "Failed to open socket");
|
||||
}
|
||||
return PyString_FromString(buf);
|
||||
return PyUnicode_FromString(buf);
|
||||
}
|
||||
|
||||
static PyObject * close_rx_udp(PyObject * self, PyObject * args)
|
||||
@@ -343,7 +344,7 @@ static PyObject * open_samples(PyObject * self, PyObject * args)
|
||||
quisk_sample_source(NULL, NULL, &afedri_read_rx_udp);
|
||||
//////////////
|
||||
return open_rx_udp(ip, port); // AFEDRI specific
|
||||
// return PyString_FromString(buf); // return a string message
|
||||
// return PyUnicode_FromString(buf); // return a string message
|
||||
}
|
||||
|
||||
// Miscellaneous functions needed by the SDR-IQ; called from the GUI thread as
|
||||
|
||||
+21
-4
@@ -1,7 +1,24 @@
|
||||
MODULE_NAME := afedrinet_io
|
||||
OBJDIR := ../build/local
|
||||
|
||||
afedrinet2:
|
||||
python2 setup.py build_ext --force --inplace
|
||||
CFLAGS := $(shell python3 ../makefil.py --cflags)
|
||||
LDFLAGS := $(shell python3 ../makefil.py --ldflags)
|
||||
EXTENSION_SUFFIX := $(shell python3 ../makefil.py --suffix)
|
||||
TARGET := $(MODULE_NAME)$(EXTENSION_SUFFIX)
|
||||
|
||||
afedrinet3:
|
||||
# Default target: Link the shared library object
|
||||
$(TARGET): afedrinet_io.o $(OBJDIR)/import_quisk_api.o $(OBJDIR)/is_key_down.o
|
||||
$(CC) -o $@ afedrinet_io.o $(LDFLAGS) $(OBJDIR)/import_quisk_api.o $(OBJDIR)/is_key_down.o
|
||||
|
||||
# Compile the C source files into object files
|
||||
afedrinet_io.o: afedrinet_io.c ../quisk.h
|
||||
$(CC) -o $@ -c $< $(CFLAGS) -I..
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
-rm -f *.o
|
||||
-rm -f $(MODULE_NAME)*.so
|
||||
|
||||
.PHONY: afedrinet-old
|
||||
afedrinet-old:
|
||||
python3 setup.py build_ext --force --inplace
|
||||
|
||||
|
||||
Reference in New Issue
Block a user