scotthibbs / FDLog_Enhanced

A stable Field Day Log program for Amateur (Ham) Radio. Easy and simple to use. Distributes the database to everyone. Allows everyone to see who is operating and which band, how many contacts etc. GOTA station use is easy and included for licensed and unlicensed contestors. Much more!!
http://www.scicsg.org/scicsg-wp/?page_id=123
GNU General Public License v2.0
15 stars 7 forks source link

Setting ARRL section - fixed #1

Closed nouse4anick closed 2 years ago

nouse4anick commented 6 years ago

Cannot set section with current code

commands attempted: .set sect wa-wwa .set sect wwa-washington .set sect wa-washington .set sect wwa-wa

all come back with invalid value, looked through the code and cannot find where the value is checked, best I can find is line 1595, changed the regular expression (I hate regular expressions) from: r'[A-Z]{2,3}-[a-zA-Z ]{2,20}$' to: r'[a-zA-Z]{2,3}-[a-zA-Z ]{2,20}$'

further note: might want to double check all regex's for cap or lower case only inputs, also cap inputs not allowed in the entry window (says lower caps please)

scotthibbs commented 6 years ago

The section is now set with def initialize(): which is run once with the question asking if this the first time fdlog is being ran. I didn't want this to change by another user once I set it with initialize but if you think the section needs changed we can add it back in.

For several years we couldn't figure out why the original program would freeze the keyboard input. We had to reboot the system to get it to work. We discovered it was because the original program does not like caps. If the user had their caps lock on it would just freeze at input. So I put a check in to guard against caps instead of freezing.

nouse4anick commented 6 years ago

I'm kinda seeing whats going on. The main issue that's happening is when you try to set the variable (ie global variable) that the program reads it still goes through the set command which has that regex that disregards capital letters, so you still need to change the regex to include both cases, you might also want to check the grid square for the vhf section because i just noticed that it will reject anything that isn't caps, I'll look deeper into the code as i go, but you might want to add to_upper in the grid square initialization section: line 325.

I'll see if i can figure out pull requests and submit at least comment on what needs to be changed (i'll add my call sign kc7sda to the comments to make it easy to find)

scotthibbs commented 2 years ago

I'm thinking the whole "IN-Indiana" is overkill. Anyway we can change this so it's just simply our section like "IN"?

I'm not sure why it was this way and it seems like a hardship for those unfamiliar with how the program wants it entered.

-Scott