diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-03-18 22:12:59 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-03-18 22:12:59 +0100 |
commit | 4c6b0def2da27635e593192ba1a2a604a824f6ab (patch) | |
tree | a3818dd40c434a7dfb387f67271896f108da1155 /bin | |
parent | 9f7c8ca6f58b37cdad278468568c48fd057f1328 (diff) |
show an error message when a power plot request cannot be fulfilled
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/dlog-viewer | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/bin/dlog-viewer b/bin/dlog-viewer index 7600446..fd5b923 100755 --- a/bin/dlog-viewer +++ b/bin/dlog-viewer @@ -583,11 +583,17 @@ def main(): export_json(dlog, args.json_export, extra_data) if args.plot: - if args.plot == "P" and dlog.all_data_slots_have_power(): - if args.pelt: - show_power_plot(dlog, changepoints) + if args.plot == "P": + if dlog.all_data_slots_have_power(): + if args.pelt: + show_power_plot(dlog, changepoints) + else: + show_power_plot(dlog) else: - show_power_plot(dlog) + print( + "Error: power plot requested, but neither power nor voltage*current readings present.", + file=sys.stderr, + ) elif args.plot == "all": show_raw_plot(dlog) else: |