Skip to content

Commit cf160cd

Browse files
patrickrbOptio Agentclaude
authored
feat(logging): persist per-QSO transmit power (tx_pwr) end to end (#244)
The "Power (W)" field on the log form was collected and POSTed as `power`, but no column consumed it and `Contact.create` never inserted it — so an operator's per-QSO power was silently dropped on save, and ADIF export could only emit the station's single default power. - schema: add nullable `contacts.tx_pwr numeric(10,2)` (ADIF TX_PWR, watts) + migration 0006_add_contacts_tx_pwr. - Contact.create: persist tx_pwr. - new-contact form: send the ADIF-standard `tx_pwr` at the wire (component state stays `power`, which is form-local and exempt from snake_case). - ADIF import: read TX_PWR so imported logs keep per-QSO power. - ADIF export: COALESCE(c.tx_pwr, s.power_watts) so a per-QSO value wins and falls back to the station default; the search export's SELECT * carries it automatically. - EditContactDialog: expose Power (W) so a logged/imported value is visible and editable (blank clears to NULL, not an empty string). - tests: guard tx_pwr export + parser round-trip in adif-generate.spec. Co-authored-by: Optio Agent <optio-agent@noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent bbd04cb commit cf160cd

10 files changed

Lines changed: 3879 additions & 8 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE "contacts" ADD COLUMN "tx_pwr" numeric(10, 2);

0 commit comments

Comments
 (0)