Skip to content

Commit

Permalink
reduce output firther
Browse files Browse the repository at this point in the history
  • Loading branch information
rpatel3001 committed Apr 20, 2024
1 parent a4c3249 commit 4d43ab2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ docker logs -f satdump | grep -v "(D)" | grep -v "Table Broadcast" | grep -v "Re
| `LOG_OUT_JSON` | Set to any value to log the reformatted JSON output to stdout. | Unset |
| `LOG_OUT_JSON_FILT` | Set to any value to log the reformatted JSON output to stdout, after filtering out non-ACARS messages. | Unset |
| `OUTPUT_ACARS_ONLY` | Set to any value to prevent outputting JSON for non-ACARS messages to ease the load on your Acarshub instance a little. | Unset |
| `STATION_ID` | The station ID to set on output messages. | Unset |
| `SNR_UPDATE_SEC` | How often to poll the HTTP API to update the VFO signal levels to attach to messages. | `1` |
| `OUTPUT_NONEMPTY_ONLY` | Set to any value to prevent outputting JSON for non-ACARS messages as well as ACARS messages with no text field. | Unset |
| `STATION_ID` | The station ID to set on output messages. | Unset |
| `SNR_UPDATE_SEC` | How often to poll the HTTP API to update the VFO signal levels to attach to messages. | `1` |

## Docker Compose

Expand Down
2 changes: 1 addition & 1 deletion rootfs/etc/scripts/reformat.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def thread_wrapper(func, *args):
print(f"ground station {gsa} not found")
out["fromaddr_decoded"] = fromaddr

if not getenv("OUTPUT_ACARS_ONLY") or "ACARS" == out.get("msg_name"):
if (getenv("OUTPUT_ACARS_ONLY") == False or "ACARS" == out.get("msg_name")) and (getenv("OUTPUT_NONEMPTY_ONLY") == False or out.get("message")):
if (getenv("LOG_OUT_JSON")) or (getenv("LOG_OUT_JSON_FILT") and "ACARS" == out.get("msg_name")):
pprint(out)
print()
Expand Down

0 comments on commit 4d43ab2

Please sign in to comment.