Skip to content
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

Python logs & interface #795

Merged
merged 4 commits into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/python_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on:
pull_request:
branches: [main]

env:
OPENC3_CLOUD: local

jobs:
unit-test:
if: ${{ github.actor != 'dependabot[bot]' }}
Expand Down
3 changes: 1 addition & 2 deletions openc3/lib/openc3/logs/buffered_packet_log_writer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ def buffered_write(entry_type, cmd_or_tlm, target_name, packet_name, time_nsec_s
end

def buffered_first_time_nsec
time = first_time()
return time.to_nsec_from_epoch if time
return @first_time if @first_time
return @buffer[0][4] if @buffer[0]
return nil
end
Expand Down
12 changes: 2 additions & 10 deletions openc3/lib/openc3/logs/log_writer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -350,20 +350,12 @@ def extension
'.log'.freeze
end

def first_time
Time.from_nsec_from_epoch(@first_time)
end

def last_time
Time.from_nsec_from_epoch(@last_time)
end

def first_timestamp
first_time().to_timestamp # "YYYYMMDDHHmmSSNNNNNNNNN"
Time.from_nsec_from_epoch(@first_time).to_timestamp # "YYYYMMDDHHmmSSNNNNNNNNN"
end

def last_timestamp
last_time().to_timestamp # "YYYYMMDDHHmmSSNNNNNNNNN"
Time.from_nsec_from_epoch(@last_time).to_timestamp # "YYYYMMDDHHmmSSNNNNNNNNN"
end
end
end
Empty file.
Loading
Loading