PILOG CHANGELOG
===============
Newest entry first. Each entry is stamped DD/MM/YYYY HH:MM:SS (local time).

27/10/2026 19:26:45
-------------------
- Net mode: the "Add New Entry" inheritance of mode, Satellite tick and satellite name
  from the previous entry now applies only when FLRig is the active rig. piHPSDR reports
  mode and SAT state itself, so the new entry is filled from the rig as normal.

27/10/2026 12:30:00
-------------------
- Net mode: "Add New Entry" now seeds the new entry from the latest rig state and
  inherits the mode, Satellite tick and satellite name the user set by hand in the
  previous entry, so it no longer defaults to SSB / non-satellite and the wrong log file.

27/10/2026 12:00:00
-------------------
- FLRig upconverter: new "Upconverter" section on the FLRig settings tab (Enable +
  offset in MHz). The offset is added to both VFO frequencies read from FLRig
  (144.373 + 2256 = 2400.373 MHz) and subtracted again when a spot click retunes the rig.

24/10/2026 17:45:00
-------------------
- MOX release hardened against a stalled rig. Queued set-commands are now flushed
  before every poll request (wait at most one round trip, not a whole cycle), and
  closing with MOX on also sends the release on a throwaway connection (ZZTX0; for
  piHPSDR, rig.set_ptt(0) for FLRig, 0.5-1 s timeout) so a poll thread blocked on a
  silent rig can no longer make the 3 s join expire with the radio still keyed.

24/10/2026 17:20:00
-------------------
- Log search and the Statistics window no longer read/parse the ADIF logs on the GUI
  thread: both run in worker threads and deliver results through the bus, so a very
  large log no longer freezes the UI. Stats shows "Loading…" and disables Refresh
  meanwhile; overlapping refreshes are coalesced. CallDB.load is now lock-guarded.

24/10/2026 16:20:14
-------------------
- FLRig: the active VFO is now read with rig.get_AB ("A"/"B"). rig.get_vfo returns
  a frequency, so VFO B was never seen as active (no green frame, MOX red on VFO A).
  Falls back to matching get_vfo's frequency against VFO A/B if get_AB is missing.

24/10/2026 10:45:00
-------------------
- Satellite name is cleared (placeholder restored) when the rig leaves SAT mode,
  unless the name was typed by the user.

24/10/2026 10:30:00
-------------------
- VFO bar: in SPLIT mode the TX VFO (not the one being received on) now turns red
  during transmit, instead of the active RX VFO. Split (FT; / rig.get_split) is
  now polled in the fast loop and sent with the VFO state.

23/10/2026 22:40:28
-------------------
- Settings (piHPSDR and FLRig tabs): choose which VFO (default VFO B) is logged
  when the rig is in SPLIT mode. Split is read via FT; / rig.get_split.

22/10/2026 20:43:40
-------------------
- Installer: when pkexec is missing and sudo needs a password, ask for it in a
  dialog and pass it to sudo -S (fixes "sudo: a password is required").

22/10/2026 16:45:19
-------------------
- DX map: new strip at the bottom to post a spot to the DX Cluster. Enter the
  DX callsign and a comment; the frequency is the active VFO in kHz
  (sent as "DX <kHz> <call> <comment>"). Enabled only while the cluster is
  connected and the rig reports a frequency.

22/10/2026 15:08:00
-------------------
- Maintenance tab: read-only field beside "Clear QRZ Cache" showing the size
  of qrz_cache.json (KB, or MB above 1024 KB); updates after clearing.

22/10/2026 14:57:43
-------------------
- Settings: new Maintenance tab with a "Clear QRZ Cache" button. After a
  confirmation popup it empties qrz_cache.json (and the in-memory cache).

21/10/2026 15:47:33
-------------------
- Stats: the Power tab (now "By power") has a pie chart and the same table
  columns as the By mode and By band tabs.

21/10/2026 15:12:01
-------------------
- FLRig support: new FLRig settings tab (host 127.0.0.1, XML-RPC port 12345) and
  Enable checkboxes on the piHPSDR and FLRig tabs; only one can be enabled.
  Rig backend switches without restarting piLog. MOX and click-to-tune work
  through either backend.

21/10/2026 13:40:22
-------------------
- VFO bar: the active VFO's frame is now the same green as its frequency
  digits (was a lighter green).

21/10/2026 13:37:15
-------------------
- VFO bar: the frame around the active VFO is now light green and the
  inactive VFO's frame light blue (was red for both).

21/10/2026 13:05:17
-------------------
- Stats window: new Map tab plotting every worked station (one pin per grid
  square, coloured by band) on OpenStreetMap tiles, with Band / Mode / Power
  dropdowns (default All), a Fit button, call labels when zoomed in and a
  tooltip listing the QSOs at a pin. Your own locator is shown as a diamond.
  QSOs without a grid are counted in the overlay but cannot be plotted.
- Internal: pan/zoom/tile code moved from SpotMapView into a shared
  TileMapView base class (DX map behaviour unchanged); compute_stats now
  works on load_qsos(); log files are read in sorted order so de-duplication
  is deterministic.

21/10/2026 12:33:44
-------------------
- Stats: countries and continents were always 0 because older logs have no
  COUNTRY/CONT fields. They are now resolved from the callsign using cty.dat
  (country-files.com), downloaded once to ~/.config/piLog/cty.dat and refreshed
  after 60 days (CallDB). Falls back to the logged country when the call is not
  in cty.dat.
- Stats: duplicate QSOs (same call/date/time/band/mode) across log files are
  counted once; stray whitespace in mode/band values is ignored; pie colours
  no longer repeat with many slices.
- New QSOs take CONT from cty.dat when available.

21/10/2026 11:54:44
-------------------
- New Stats window (top-bar "Stats" button): QSOs per mode and per band as pie
  charts, with tables of average/longest distance, countries and continents;
  a Power tab shows the longest distance for <=10 W, >10-50 W, >50-100 W and
  >100 W. Built from all log files by compute_stats(); distance is the grid to
  grid great circle (my_gridsquare, else the Settings locator).
- New QSOs now also write ADIF CONT, derived from the country name through the
  built-in COUNTRY_CONTINENT table (older logs use the same table).

16/10/2026 09:52:12
-------------------
- install.py: fixed "Ham Radio submenu already exists" when the menu had been
  deleted in KDE Menu Editor. Orphan .directory files and kmenuedit menus
  marked <Deleted/> no longer count as an existing menu; ham_menu_exists()
  now only looks at live <Menu> definitions.
- install.py: kmenu_edit() drops tombstoned Ham Radio menus, creates a live
  one when none exists, and un-hides piLog (.hidden Include, Utilities
  Exclude).

15/10/2026 22:24:49
-------------------
- install.py: the installer now follows the desktop colours (KDE kdeglobals,
  else GNOME/GTK dark preference) instead of the fixed light grey.
- install.py: new Uninstall button removes the desktop icon and the menu
  entry (packages and ~/.config/piLog are kept).
- install.py: creates the Ham Radio submenu when none exists and adds piLog
  to an existing KDE kmenuedit Ham Radio menu (backed up before editing).

15/10/2026 21:58:00
-------------------
- New install.py: GUI installer (tkinter) that installs python3-pyqt6 and
  python3-requests via apt (pkexec), adds piLog to the Ham Radio menu and
  creates a desktop icon. Runs in place; --dry-run shows the steps only.
- The application now sets its desktop file name to "piLog" so the window
  matches the piLog.desktop launcher.

15/10/2026 11:20:00
-------------------
- DX map key bar: band entries no longer overlap the OpenStreetMap
  attribution; bands that do not fit are replaced by "..." and the
  attribution is shortened on very narrow windows.

15/10/2026 11:00:00
-------------------
- The DX map now shades the night side of the world and draws the day/night
  terminator (greyline), updated every minute, with a key entry.

15/10/2026 10:38:34
-------------------
- QRZ lookups are cached in ~/.config/piLog/qrz_cache.json and reused for 60
  days, after which the next lookup refreshes the entry from QRZ (stale data
  is used if QRZ cannot be reached). Before asking QRZ, a callsign already
  present in the ADIF log files supplies name/QTH/grid/country/state/county/
  IOTA. Cache and log data are used even when QRZ lookups are disabled.

15/10/2026 10:16:06
-------------------
- DX cluster spots are now limited to the band of the active VFO (A or B):
  spots on other bands are ignored and dropped when the band changes. With
  no rig connected all bands are shown.

14/10/2026 17:45:48
-------------------
- The DX map's spot list column can be resized by dragging the divider
  between it and the map.

14/10/2026 17:36:57
-------------------
- The DX map window has a list of the current spots (newest first: time,
  call, kHz coloured by band, mode) in a column down its left side. Clicking
  a row tunes the VFO and fills the callsign like clicking its pin, and pans
  the map to the spot.

14/10/2026 17:23:53
-------------------
- A callsign filled in from a DX map pin is no longer committed: the entry's
  date/time keep following the clock until Enter is pressed or focus leaves
  the callsign field.

14/10/2026 17:21:43
-------------------
- Clicking a spot on the DX map now also puts the DX callsign in a log entry
  (first empty entry in Net mode, the single entry otherwise) and starts the
  QRZ lookup, ready to log.
- The map's band key and OpenStreetMap attribution now sit on their own bar
  under the map instead of over the grid labels.

14/10/2026 17:10:13
-------------------
- New DX Cluster map window, opened automatically while the DX Cluster
  service is enabled (and from the new DX map button). It connects to the
  cluster with the Online services credentials, looks each DX call up on QRZ
  (lat/lon, else grid) and plots it on an OpenStreetMap world map (tiles
  cached in ~/.config/piLog/tiles) with a Maidenhead field/square/subsquare
  overlay that gets finer as you zoom. Hovering a pin shows the spot data;
  clicking it tunes the active VFO to the spot's frequency and mode (VFO-B:
  frequency only, because piHPSDR's ZZME set command alters VFO-A). Spots
  stay for 10 minutes and a respot restarts the 10 minutes.
- QRZ lookups now also return lat/lon.

14/10/2026 16:49:34
-------------------
- DX Cluster settings: added a Port field (default 7300).

14/10/2026 16:46:12
-------------------
- Settings > Online services: new DX Cluster login (host, username, password)
  with an Enable checkbox, off by default. Stored only; not used yet.

14/10/2026 16:05:01
-------------------
- The red frames round the VFO A / VFO B displays' corners and now size to the
  frequency text, growing and shrinking with the number of digits.

14/10/2026 15:56:34
-------------------
- The VFO A and VFO B displays each have a 2 px red frame.

14/10/2026 13:10:00
-------------------
- The VFO A / VFO B displays are now centred in their halves of the bar, so
  the pair is symmetric about the window centre.

14/10/2026 13:00:00
-------------------
- New VFO A / VFO B frequency displays below the top button row, coloured as
  in piHPSDR's VFO bar (bright green = active receiver, dim green = other
  VFO, red = active VFO while transmitting). Both follow the rig in near
  realtime (~0.1 s) while tuning: frequency, active receiver and MOX are now
  polled fast, while mode and SAT are still read every ~0.5 s.

14/10/2026 12:26:16
-------------------
- The Power (W) field now keeps a value changed by the user for all later
  entries until changed again or piLog is exited, instead of reverting to
  the default power after every save.

14/10/2026 12:17:38
-------------------
- The date/time clock now keeps running while a callsign is being typed. It
  stops (fixing the QSO start time) only when the callsign is committed:
  Enter is pressed, or focus moves to another field via Tab or a mouse click.

11/10/2026 12:10:00
-------------------
- New MOX button left of the Mode button. Clicking it sends the piHPSDR MOX
  command (ZZTX); the button turns red whenever the radio is in MOX
  transmit, including when MOX was pressed in piHPSDR, and returns to normal
  in RX. Its state is read back from the rig on every poll, so a refused TX
  (TX inhibit, out of band) leaves it unlit. It is disabled while piHPSDR is
  not connected, and closing piLog while keyed releases MOX.

11/10/2026 11:45:00
-------------------
- Fixed a "wrapped C/C++ object of type Bus has been deleted" thread error on
  exit: closing the window now stops and waits for the rig polling thread,
  which also no longer emits signals once stopped.

11/10/2026 11:20:00
-------------------
- New State, County and IOTA fields on the logging entry, written to the log
  and uploads as ADIF STATE, CNTY (as "ST,County") and IOTA. The QRZ.com
  lookup fills them where available. The QTH field no longer has the state
  appended (it has its own field). The search dialog shows a State column.

11/10/2026 10:52:00
-------------------
- In piHPSDR SAT mode with VFO-A at 10489.5-10490.0 MHz and VFO-B at
  2400.0-2400.5 MHz the satellite name is filled in as QO-100 (unless typed
  by hand). Both VFO frequencies are now polled.

11/10/2026 10:37:24
-------------------
- The Satellite checkbox follows piHPSDR's SAT/RSAT mode (polled with the SA;
  CAT command) and unticks when SAT mode is left. Ticking or unticking it by
  hand overrides the rig until the entry is saved or cleared.

10/10/2026 22:22:34
-------------------
- Logging entry shows the great-circle distance (km and miles) and beam
  heading (degrees and compass point) from the home locator (Settings) to the
  DX grid, whether typed or filled in from QRZ.com. Display only: not written
  to the ADIF log. Hidden while either locator is missing or invalid.

10/10/2026 22:14:52
-------------------
- Settings > Online services: an Enable checkbox beside QRZ user, QRZ Logbook
  user and eQSL user switches that service on or off without deleting the
  credentials (default on, so existing settings behave as before). A disabled
  service makes no requests; its upload queue is kept and retried once it is
  enabled again. The QRZ checkbox gates the callsign lookup.

10/10/2026 22:05:37
-------------------
- Note: on Wayland sessions the qt6-wayland package is required
  (sudo apt install qt6-wayland). Without it Qt prints "Could not find the Qt
  platform plugin 'wayland'" at startup and falls back to X11/XWayland.

10/10/2026 22:01:16
-------------------
- Show the piLog icon (piLog-icon.png) in the top-left corner of the main
  window and use it as the window icon.

10/10/2026 00:51:53
-------------------
- piLog v1.0: initial release (PyQt6, single file pilog.py).
  Single log mode and Net mode (multiple open entries, each with its own Save,
  plus an Add entry button).

- piHPSDR-Improved link via the rigctl CAT port 19090: frequency, band and mode
  are filled in from VFO-A (RX1) or VFO-B (RX2), whichever is active. Fields
  remain editable.

- QRZ.com XML lookup when the DX callsign is entered (name, QTH, grid, country).
  Fields remain editable.

- ADIF logging to per-category files: satellite, QRP and QRO for SSB, CW, FM,
  DATA and FREEDV. 10 W or below is QRP, above 10 W is QRO. All satellite QSOs
  go to the satellite file. A single file for all categories can be chosen.

- Settings page: callsign, locator, operator name and QTH, QRZ user/password,
  QRZ Logbook user/key, eQSL user/password, log file paths, piHPSDR host/port.

- Save uploads the QSO to QRZ Logbook and eQSL, with a retry queue for failures.

- Search all log files for a callsign; shows the last 6 contacts in a separate
  window.

- Added QRP AM and QRO AM categories with their own path fields (AM is no
  longer logged with FM).

- QRZ/eQSL upload is skipped when credentials are not entered: no network
  attempt, nothing queued, QSO stored in the local ADIF file only. The status
  bar reports which service was skipped.

- Breeze Dark / dark theme fixes: readable placeholder and disabled text, real
  bordered buttons with hover and pressed states, highlighted Save button, a
  bordered box and gap around each log entry, and entries are no longer
  squashed when several are open.
