-
Notifications
You must be signed in to change notification settings - Fork 13
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
Added new table of recent QSOs and more cleanup of the INI file plus a few others. #69
base: master
Are you sure you want to change the base?
Conversation
…less only. A future change is to set which charts are created in the config n1mm_view.ini file. I also updated the init files to output StandardOutput and StandareError to journal as syslog is out of favor nowadays (I just learned that...) Constants also have some mode changes to add potential bad modes if the source programhas an issue. Specifically, I made a mode of NoMode set to DATA as in some rare cases, TR4W could not have a sub-mode That usually happens on older radios without explicity sub-modes like PSK or USB-D. I updated INSTALL_RASPI to mention the config file goes in just one place and also to suggest adding a symbolic link to /root/.config as I run dashboard with sudo I updated rpi_install.sh to copy the ini file to the ./config directory.
Removed config.sample file as the new file is now named n1mm_view.ini.sample
…table. This should be useful for the last_qso_logic too.
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.
This can be merged, there are some comments I made, you can fix them if you like. Kindly advise. Thanks for the PR.
@@ -70,7 +71,9 @@ def create_images(size, image_dir, last_qso_timestamp): | |||
last_qso_time, message = dataaccess.get_last_qso(cursor) | |||
|
|||
logging.debug('old_timestamp = %s, timestamp = %s' % (last_qso_timestamp, last_qso_time)) | |||
if last_qso_time != last_qso_timestamp: | |||
if config.SKIP_TIMESTAMP_CHECK: | |||
logging.warn('Skipping check for a recent QSO - Please jkust use this for debug - Review SKIP_TIMESTAMP_CHECK in ini file') |
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.
typo jkust
count = 0 | ||
cells = [['Time', 'Call', 'Band', 'Mode', 'Operator', 'Section', 'Station']] | ||
|
||
for d in qsos: |
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.
since the number of qsos is already limited by the fetch, does this need to also limit the size? Another way to do this would be to slice the QSOs e.g. for d in qsos[:10]
or something like that. in all this looks good. TY
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.
Good point. Since the fetch of the records is its own discrete function, this protects the table generation in case a result set of too large a size is returned. That way the generation protects itself without relying upon how big the supplied set is. I wasn't aware of the syntax for d in qsos[:10]. That is handy.
@@ -38,18 +38,18 @@ class Modes: | |||
""" | |||
all the modes that are supported. | |||
""" | |||
MODES_LIST = ['N/A', 'CW', 'AM', 'FM', 'LSB', 'USB', 'RTTY', 'PSK', 'PSK31', 'PSK63', 'FT8', 'FT4'] | |||
MODES_LIST = ['N/A', 'CW', 'AM', 'FM', 'LSB', 'USB', 'SSB', 'RTTY', 'PSK', 'PSK31', 'PSK63', 'FT8', 'FT4', 'MFSK', 'NoMode', 'None'] |
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.
does your logging software (I think you are not using N1MM) emit a mode of 'SSB'?
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.
I have seen other software send SSB. I think TR4W (which I maintain) did but I fixed that issue. This is a belt-and-suspenders approach now more so just in case.
@@ -17,6 +17,7 @@ | |||
import matplotlib.pyplot as plt | |||
import pygame | |||
from matplotlib.dates import HourLocator, DateFormatter | |||
import pprint |
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.
what's this for? I don't see any usages.
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.
It is a debugging remnant. It can be removed. Sorry.
Major addition is a new table that shows the last 10 QSOs. This was added to headless.py only. If it seems generally useful, it can go into dashboard.py as well.
Note I am not completely satisfied with the way this table looks but I have not yet learned how to format these tables nicely (pygame I think). The text should be centered as an example.
I also updated the init/ files to output the log to journal as seems to be the preferred way to do it now. There may be a backward compatibility issue if someone is running on an old version of Debian but that should not be an issue as this tool does require some Debian knowledge.
Other changes are in the commit notes.
Optimally now that we have the ini file, we could add some code to selectively allow not display certain charts. Make the fallback value True but have something like BUILD_STATION_TABLE = False in the INI file. That would make sense for a single station user as no reason to take up the time displaying the station pie chart.