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

Dev #38

Merged
merged 28 commits into from
Nov 9, 2024
Merged

Dev #38

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
82d3128
- AX25_PoPT_en.pdf added
DerHirschi Mar 4, 2024
8137c13
- EnvVARS $lastConnDate & $lastConnTime added
DerHirschi Mar 5, 2024
4295f5d
- fix: UI-Frames are not digipeted
DerHirschi Mar 5, 2024
6a914f0
- added: UI-Frames digipeating via L3-DIGI
DerHirschi Mar 5, 2024
6c0d8db
- conversd-SPECS added
DerHirschi Mar 7, 2024
a9f037e
- opt/cleanup ax25Connection.py
DerHirschi Mar 9, 2024
10923ce
- fixed: Pipe-Tool
DerHirschi Mar 9, 2024
b660c97
- default_config.py some cleanups..
DerHirschi Mar 10, 2024
2be21aa
- fixed: some issues with DIGI/Link connections
DerHirschi Mar 10, 2024
40a7da9
- fixed: some issues with DIGI/Link connections
DerHirschi Mar 29, 2024
90ab28c
- fixed: AXIP Lookup for Node connects
DerHirschi Mar 29, 2024
064bc21
- NetRom UI Frame decoding and Monitor Output
DerHirschi Apr 7, 2024
52a4b8d
- ax25monitor.py updated
DerHirschi Apr 7, 2024
1bd6011
- fixed: KISSTCP when KISSTCP-Device not available
DerHirschi Apr 10, 2024
77e8fa9
- fixed: KISSTCP when KISSTCP-Device not available
DerHirschi Apr 10, 2024
ac3b6d4
- fixed: Console Spam
DerHirschi Apr 11, 2024
1fa9849
- Main window aspect ratios adjusted
DerHirschi Apr 14, 2024
a382a2d
- -------
DerHirschi Jun 24, 2024
c78cdb0
- Fixed: Language not changeable
DerHirschi Nov 2, 2024
d73c293
- Opt: guiPortSettings.py
DerHirschi Nov 2, 2024
c6c50e4
- Add Error Logs to Call-Validator - ax25dec_enc.py
DerHirschi Nov 2, 2024
1375f6b
- NetRom decoding disabled
DerHirschi Nov 2, 2024
5f932fe
- VarOpt/CodeOpt
DerHirschi Nov 3, 2024
de82b3d
- VarOpt/CodeOpt
DerHirschi Nov 3, 2024
94c8c92
- Fixed: Station Distance
DerHirschi Nov 3, 2024
9ab3553
- string_tab.py updated. Thanks to NL5VKL for the Dutch translation.
DerHirschi Nov 6, 2024
1430f47
- changelog edited
DerHirschi Nov 9, 2024
c3f64ab
- changelog edited
DerHirschi Nov 9, 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
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Tested on Python Version:
Install all dependencies:
``` sh
$ sudo apt install python3-tk
$ sudo apt install python3-pil python3-pil.imagetk
$ sudo apt install python3-matplotlib
$ pip install -r requirements.txt
```
Expand All @@ -43,6 +44,11 @@ Run:
$ python3 PoPT.py
```

Install all dependencies for Python 3.11 (Thanks to Lars):
``` sh
$ sudo apt install python3-matplotlib python3-tk python3-crcmod python3-gtts python3-pip python3-networkx python3-minimal
$ pip install --break-system-packages playsound pyserial aprslib
```

#### Supported AX.25 connection options:
- KISS via TCP (e.g. Direwolf)
Expand Down
33 changes: 30 additions & 3 deletions UserDB/UserDBmain.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
import os
import pickle
import logging

from fnc.ax25_fnc import call_tuple_fm_call_str, validate_call
from fnc.cfg_fnc import set_obj_att, cleanup_obj_dict, set_obj_att_fm_dict
from fnc.loc_fnc import locator_to_coordinates
from fnc.loc_fnc import locator_to_coordinates, locator_distance
from fnc.str_fnc import conv_time_for_sorting
from cfg.constant import CFG_user_db

Expand Down Expand Up @@ -67,6 +68,7 @@ class UserDB:
def __init__(self):
print("User-DB INIT")
logger.info("User-DB INIT")
self._port_handler = None
self.not_public_vars = [
'not_public_vars',
'call_str',
Expand Down Expand Up @@ -124,14 +126,17 @@ def __init__(self):
self.db[k].Call = str(k)
self.db[k].SSID = 0

def set_port_handler(self, port_handler):
self._port_handler = port_handler

def get_entry(self, call_str, add_new=True):
call_str = validate_call(call_str)
if call_str:
call_tup = call_tuple_fm_call_str(call_str)
if call_str not in self.db.keys():
if call_tup[0] not in self.db.keys():
if add_new:
return self.new_entry(call_str)
return self._new_entry(call_str)
else:
return False
else:
Expand All @@ -141,7 +146,7 @@ def get_entry(self, call_str, add_new=True):
return self.db[call_str]
return False

def new_entry(self, call_str):
def _new_entry(self, call_str):
call_str = validate_call(call_str)
if call_str:
if call_str not in self.db.keys():
Expand Down Expand Up @@ -179,6 +184,24 @@ def set_pr_mail_add_for_BBS(self, address: str, ):
ent.TYP = 'BBS'
ent.PRmail = address

def set_distance(self, entry_call: str):
if self._port_handler is None:
return False
own_loc = self._port_handler.get_gui().own_loc
if not own_loc:
return False
ent = self.get_entry(entry_call, False)
if not ent:
return False
if not ent.LOC:
ent.Distance = -1
return False
ent.Distance = locator_distance(own_loc, ent.LOC)

def set_distance_for_all(self):
for k in list(self.db.keys()):
self.set_distance(k)

def get_keys_by_typ(self, typ='SYSOP'):
ret = []
for k in list(self.db.keys()):
Expand Down Expand Up @@ -299,6 +322,10 @@ def get_location(self, call_str):

def get_AXIP(self, call_str):
ret = self.db.get(call_str, None)
if ret:
return ret.AXIP
call = call_tuple_fm_call_str(call_str)[0]
ret = self.db.get(call, None)
if ret:
return ret.AXIP
return '', 0
Expand Down
Loading