-
Notifications
You must be signed in to change notification settings - Fork 32
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
Support several multipliers for a QSO #442
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -290,9 +290,12 @@ void prepare_specific_part(char *logline, struct qso_t *qso) { | |
new_cty = 0; | ||
} | ||
|
||
} else if (generic_mult != MULT_NONE) { | ||
|
||
strncat(logline, qso->mult1_value, 9); | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What happens if we have >=10 points? We get no space between multi and points. Or should we drop one more character from the combined multi field ... That would allow only 7 characters. I fear we must live with the missing separating space here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, we have to live with the missing separator. A wider terminal screen could solve this, but also introduce a bunch of other problems. |
||
} else if (wysiwyg_multi | ||
|| unique_call_multi != MULT_NONE | ||
|| generic_mult != MULT_NONE | ||
|| serial_section_mult | ||
|| sectn_mult | ||
|| sectn_mult_once | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
40CW 21-Nov-23 22:34 0001 AB1AAA --- --- 4ELDO ELDO 3 | ||
40CW 21-Nov-23 22:34 0002 AB1BBB --- --- 007 ELDO 3 | ||
40CW 21-Nov-23 22:35 0003 AB1CCC --- --- 123 KING TULA KING TUL 3 | ||
40CW 21-Nov-23 22:36 0004 AB1DDD --- --- 27TULA 3 | ||
40CW 21-Nov-23 22:36 0005 AB1EEE --- --- 64ORAN ORAN 3 | ||
40SSB 21-Nov-23 22:37 0006 AB1FFF --- --- 8 BUTT BUTT 2 | ||
40SSB 21-Nov-23 22:38 0007 AB1GGG --- --- 5 TULA KERN KERN 2 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
RULES=cqp | ||
CALL=AB6AAA |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
######################## | ||
# | ||
# | ||
# | ||
######################## | ||
# | ||
CONTEST_MODE | ||
LOGFILE=cqp.log | ||
CABRILLO=UNIVERSAL | ||
GENERIC_MULT=BAND | ||
NO_RST | ||
PLUGIN_CONFIG=FL | ||
SSBPOINTS=2 | ||
CWPOINTS=3 | ||
# | ||
################################## | ||
# # | ||
# Messages F1= to F12= # | ||
# Message CQ_TU_MSG= # | ||
# Message S&P_TU_MSG= # | ||
# # | ||
# % = call # | ||
# @ = hiscall # | ||
# # = serial # | ||
# [ = RST # | ||
# + = increase cw speed # | ||
# - = decrease cw speed # | ||
# # | ||
################################## | ||
# | ||
F1=cq cqp % | ||
F2=@ DE % | ||
F3=# FL | ||
F4=TU | ||
F5=@ | ||
F6=% | ||
F7=@ SRI QSO B4 GL | ||
F8=AGN | ||
F9= ? | ||
F10= QRZ? | ||
F11= PSE K | ||
F12=cq cqp % | ||
# | ||
CQ_TU_MSG=TU % | ||
S&P_TU_MSG=# FL | ||
# | ||
#ALT_0= | ||
#ALT_1= | ||
#ALT_2= | ||
#ALT_3= | ||
#ALT_4= | ||
#ALT_5= | ||
#ALT_6= | ||
#ALT_7= | ||
#ALT_8= | ||
#ALT_9= | ||
# | ||
#SEND_DE | ||
# | ||
CABRILLO-QSO-FORMAT=CQP | ||
CABRILLO-EXCHANGE=# FL | ||
CABRILLO-CONTEST= | ||
####### END ##################### | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
""" | ||
CQP contest | ||
https://www.cqp.org/ | ||
""" | ||
import re | ||
|
||
MY_STATE = None | ||
|
||
CA_COUNTIES = ['ALAM', 'ALPI', 'AMAD', 'BUTT', 'CALA', 'COLU', 'CCOS', 'DELN', | ||
'ELDO', 'FRES', 'GLEN', 'HUMB', 'IMPE', 'INYO', 'KERN', 'KING', 'LAKE', | ||
'LASS', 'LANG', 'MADE', 'MARN', 'MARP', 'MEND', 'MERC', 'MODO', 'MONO', | ||
'MONT', 'NAPA', 'NEVA', 'ORAN', 'PLAC', 'PLUM', 'RIVE', 'SACR', 'SBEN', | ||
'SBER', 'SDIE', 'SFRA', 'SJOA', 'SLUI', 'SMAT', 'SBAR', 'SCLA', 'SCRU', | ||
'SHAS', 'SIER', 'SISK', 'SOLA', 'SONO', 'STAN', 'SUTT', 'TEHA', 'TRIN', | ||
'TULA', 'TUOL', 'VENT', 'YOLO', 'YUBA'] | ||
|
||
STATES = ['AL', 'AK', 'AZ', 'AR', | ||
# 'CA' -- The first valid QSO logged with 4-letter county abbreviation will count as the multiplier for California. | ||
'CO', 'CT', 'DE', 'FL', 'GA', 'HI', 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', | ||
'LA', 'ME', 'MD', 'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV', 'NH', | ||
'NJ', 'NM', 'NY', 'NC', 'ND', 'OH', 'OK', 'OR', 'PA', 'RI', 'SC', 'SD', | ||
'TN', 'TX', 'UT', 'VT', 'VA', 'WA', 'WV', 'WI', 'WY', | ||
# Canada | ||
'AB', 'BC', 'MB', 'NB', 'NL', 'NT', 'NS', 'NU', 'ON', 'PE', 'QC', 'SK', 'YT' | ||
] | ||
|
||
MULT_PATTERN = re.compile('[A-Z\s]+$') # trailing block of letters and spaces | ||
|
||
def init(cfg): | ||
global MY_STATE | ||
MY_STATE = cfg | ||
|
||
def check_exchange(qso): | ||
m = MULT_PATTERN.search(qso.exchange) | ||
if m: | ||
parts = m.group(0).split() | ||
else: | ||
parts = [] | ||
|
||
mult = '' | ||
|
||
if MY_STATE == 'CA': | ||
if len(parts) == 0: # no value | ||
pass | ||
elif len(parts) == 1: # single value | ||
part = parts[0] | ||
if part in STATES: | ||
mult = part | ||
elif part in CA_COUNTIES: | ||
mult = 'CA' | ||
else: # multiple values, all must be valid CA counties | ||
ok = True | ||
for part in parts: | ||
if part not in CA_COUNTIES: | ||
ok = False | ||
if ok: | ||
mult = 'CA' | ||
else: # Non-California Station | ||
for part in parts: | ||
if part in CA_COUNTIES: | ||
mult += part + ' ' | ||
|
||
return {'mult1_value': mult} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe locate function near related remember_multi()?