Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pip installer #707

Merged
merged 82 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
fc7ff0b
WIP ubuntu appimage runner
Mar 11, 2024
1b26162
attempt fixing syntax error
Mar 11, 2024
ef1fcfe
adjusted protocol to support datac14
Mar 29, 2024
aacc09f
added datac14 to modem..
Mar 29, 2024
158d43a
fixed protocol
Mar 30, 2024
83e7c11
WIP ARQ
Mar 31, 2024
c592c9c
WIP ARQ
DJ2LS Mar 31, 2024
beb9589
adjsuted timing
DJ2LS Mar 31, 2024
20a76a8
adjusted timing
DJ2LS Mar 31, 2024
4bc71e2
adjusted timing
DJ2LS Mar 31, 2024
33cb040
ARQ WIP
DJ2LS Mar 31, 2024
05bff2f
reduced audio block size
DJ2LS Mar 31, 2024
6fe921a
ARQ WIP
DJ2LS Apr 1, 2024
8fbc985
ARQ WIP
DJ2LS Apr 1, 2024
0be52c4
more audio related work
DJ2LS Apr 1, 2024
1b3d61a
ARQ WIP
DJ2LS Apr 1, 2024
d23333f
bump version
DJ2LS Apr 1, 2024
159d214
adjusted fft - still not correct
DJ2LS Apr 1, 2024
6157de3
cleanup and fixed correct burst type detection
DJ2LS Apr 1, 2024
0dacdb2
changed compression algorithm
DJ2LS Apr 1, 2024
f81c04a
added version control to arq
DJ2LS Apr 1, 2024
efefb4b
added arq protocol version
DJ2LS Apr 1, 2024
37bedcf
short test with reduced times
DJ2LS Apr 2, 2024
24eb393
short test with reduced times
DJ2LS Apr 2, 2024
a9c1e04
short test with reduced times
DJ2LS Apr 2, 2024
884b233
short test with reduced times
DJ2LS Apr 2, 2024
8d77139
short test with reduced times
DJ2LS Apr 2, 2024
a004831
short test with reduced times
DJ2LS Apr 2, 2024
ed72880
short test with reduced times
DJ2LS Apr 2, 2024
2fb8631
short test with reduced times
DJ2LS Apr 2, 2024
b0c6626
short test with reduced times
DJ2LS Apr 2, 2024
c2388a6
bringing back statistics
DJ2LS Apr 2, 2024
e998d1d
bringing back statistics
DJ2LS Apr 2, 2024
4004f7a
first attempt implementing custom api function of codec2
DJ2LS Apr 4, 2024
6745aea
first attempt implementing custom api function of codec2
DJ2LS Apr 4, 2024
d886edc
adjusted modes
DJ2LS Apr 4, 2024
5a3326f
adjusted MA_UW_BIT to QAM
DJ2LS Apr 6, 2024
e33b82b
first test program
DJ2LS Apr 6, 2024
7040bc8
first test program
DJ2LS Apr 6, 2024
648064d
first success with datac1
DJ2LS Apr 6, 2024
3c7b799
some mode related testing
Apr 7, 2024
7330922
some mode related testing
Apr 7, 2024
ef18f4c
fixing tests
Apr 7, 2024
0ef6579
fixing tests
Apr 8, 2024
9a6e627
adjusted maximum bandwidth
Apr 8, 2024
6afff6b
mode adjustments
Apr 8, 2024
f983a9b
mode adjustments
Apr 8, 2024
aefce88
fixing a crc bug - but origin not found yet
Apr 8, 2024
6dc9310
codec2 win dll
Mashintime Apr 9, 2024
b8450c8
Ignore message db
Mashintime Apr 9, 2024
14b66ff
Del old libs
Mashintime Apr 9, 2024
61270b9
adjusted ofdm2438
Apr 10, 2024
00a0c39
adjusted ofdm2438
Apr 10, 2024
93a9cba
adjusted ofdm2438
Apr 10, 2024
2ed9b4b
Attempt at stats fix
Mashintime Apr 12, 2024
6b36bef
fixed a shutdown error
Apr 12, 2024
ef19210
Merge remote-tracking branch 'origin/dev-datac14' into dev-datac14
Apr 12, 2024
792eddd
adjusted timeouts
Apr 12, 2024
1ac3185
version udpate
Apr 12, 2024
2c331ec
beacon away from key flag on server layer
Apr 13, 2024
7ee525f
adjusted afk stuff
Apr 13, 2024
94f8f4e
adjusted afk for explorer
Apr 13, 2024
bd28737
fixed ARQ test checksum bug
Apr 13, 2024
6a34101
debugging for mac builds...
Apr 13, 2024
855e826
removed debugging for mac builds...
Apr 13, 2024
eb69959
gui fixes
Apr 13, 2024
27bf617
adjusted session aborting
Apr 13, 2024
956fbf9
[CodeFactor] Apply fixes
code-factor Apr 13, 2024
b31c693
Merge branch 'develop' into dev-datac14
DJ2LS Apr 13, 2024
5785673
gui version update
Apr 13, 2024
1e04854
Add Speed/SNR Chart Gird Widget
Mashintime Apr 16, 2024
bed7410
fixed beacon away from key
Apr 16, 2024
0f6865f
fixed beacon away from key
Apr 16, 2024
848aae3
Merge branch 'refs/heads/dev-datac14' into dev-appimage-installer
Apr 17, 2024
0f97740
added linux dependencies
Apr 17, 2024
5958820
added linux dependencies
Apr 17, 2024
5eac888
first test with pip package
Apr 17, 2024
0a58dd7
push adjustment
Apr 17, 2024
71a31b8
adjusted depencencies
Apr 17, 2024
a75081b
adjusted depencencies
Apr 17, 2024
71433f6
adjusted description
Apr 17, 2024
40ca8c9
push on tag
Apr 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
changed compression algorithm
  • Loading branch information
DJ2LS committed Apr 1, 2024
commit 0dacdb2e4f30d487a94c6920d49c9a699c30bb8f
47 changes: 31 additions & 16 deletions modem/arq_data_type_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
import structlog
import lzma
import gzip
import zlib
from message_p2p import message_received, message_failed, message_transmitted
from enum import Enum

class ARQ_SESSION_TYPES(Enum):
raw = 0
raw_lzma = 10
raw_gzip = 11
p2pmsg_lzma = 20
p2pmsg_zlib = 20
p2p_connection = 30

class ARQDataTypeHandler:
Expand Down Expand Up @@ -38,11 +39,11 @@ def __init__(self, event_manager, state_manager):
'failed': self.failed_raw_gzip,
'transmitted': self.transmitted_raw_gzip,
},
ARQ_SESSION_TYPES.p2pmsg_lzma: {
'prepare': self.prepare_p2pmsg_lzma,
'handle': self.handle_p2pmsg_lzma,
'failed' : self.failed_p2pmsg_lzma,
'transmitted': self.transmitted_p2pmsg_lzma,
ARQ_SESSION_TYPES.p2pmsg_zlib: {
'prepare': self.prepare_p2pmsg_zlib,
'handle': self.handle_p2pmsg_zlib,
'failed' : self.failed_p2pmsg_zlib,
'transmitted': self.transmitted_p2pmsg_zlib,
},
ARQ_SESSION_TYPES.p2p_connection: {
'prepare': self.prepare_p2p_connection,
Expand Down Expand Up @@ -148,25 +149,39 @@ def transmitted_raw_gzip(self, data, statistics):
decompressed_data = gzip.decompress(data)
return decompressed_data

def prepare_p2pmsg_lzma(self, data):
def prepare_p2pmsg_zlib(self, data):
compressed_data = lzma.compress(data)
self.log(f"Preparing LZMA compressed P2PMSG data: {len(data)} Bytes >>> {len(compressed_data)} Bytes")

compressor = zlib.compressobj(level=6, wbits=-zlib.MAX_WBITS, strategy=zlib.Z_FILTERED)
compressed_data = compressor.compress(data) + compressor.flush()

self.log(f"Preparing ZLIB compressed P2PMSG data: {len(data)} Bytes >>> {len(compressed_data)} Bytes")
return compressed_data

def handle_p2pmsg_lzma(self, data, statistics):
decompressed_data = lzma.decompress(data)
self.log(f"Handling LZMA compressed P2PMSG data: {len(decompressed_data)} Bytes from {len(data)} Bytes")
def handle_p2pmsg_zlib(self, data, statistics):
decompressor = zlib.decompressobj(wbits=-zlib.MAX_WBITS)
decompressed_data = decompressor.decompress(data)
decompressed_data += decompressor.flush()

self.log(f"Handling ZLIB compressed P2PMSG data: {len(decompressed_data)} Bytes from {len(data)} Bytes")
message_received(self.event_manager, self.state_manager, decompressed_data, statistics)
return decompressed_data

def failed_p2pmsg_lzma(self, data, statistics):
decompressed_data = lzma.decompress(data)
self.log(f"Handling failed LZMA compressed P2PMSG data: {len(decompressed_data)} Bytes from {len(data)} Bytes", isWarning=True)
def failed_p2pmsg_zlib(self, data, statistics):
decompressor = zlib.decompressobj(wbits=-zlib.MAX_WBITS)
decompressed_data = decompressor.decompress(data)
decompressed_data += decompressor.flush()

self.log(f"Handling failed ZLIB compressed P2PMSG data: {len(decompressed_data)} Bytes from {len(data)} Bytes", isWarning=True)
message_failed(self.event_manager, self.state_manager, decompressed_data, statistics)
return decompressed_data

def transmitted_p2pmsg_lzma(self, data, statistics):
decompressed_data = lzma.decompress(data)
def transmitted_p2pmsg_zlib(self, data, statistics):
# Create a decompression object with the same wbits setting used for compression
decompressor = zlib.decompressobj(wbits=-zlib.MAX_WBITS)
decompressed_data = decompressor.decompress(data)
decompressed_data += decompressor.flush()

message_transmitted(self.event_manager, self.state_manager, decompressed_data, statistics)
return decompressed_data

Expand Down
2 changes: 1 addition & 1 deletion modem/command_message_send.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def transmit(self, modem):
# Convert JSON string to bytes (using UTF-8 encoding)
payload = message.to_payload().encode('utf-8')
json_bytearray = bytearray(payload)
data, data_type = self.arq_data_type_handler.prepare(json_bytearray, ARQ_SESSION_TYPES.p2pmsg_lzma)
data, data_type = self.arq_data_type_handler.prepare(json_bytearray, ARQ_SESSION_TYPES.p2pmsg_zlib)

iss = ARQSessionISS(self.config,
modem,
Expand Down