Skip to content

Commit

Permalink
Merge pull request #526 from BallAerospace/script_func_to_api
Browse files Browse the repository at this point in the history
closes #278. support more functonality in internal api.
  • Loading branch information
ryanmelt committed Aug 4, 2017
2 parents 66d9df3 + c42ad56 commit 697b1c3
Show file tree
Hide file tree
Showing 8 changed files with 1,013 additions and 989 deletions.
2 changes: 0 additions & 2 deletions demo/config/targets/INST/screens/tabs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ TABBOOK

VERTICALBOX
LABELVALUE INST ADCS TIMEFORMATTED WITH_UNITS 30
LABELVALUE COSMOS VERSION COSMOS
END
END

Expand All @@ -62,7 +61,6 @@ TABBOOK

VERTICALBOX
LABELVALUE INST HEALTH_STATUS TIMEFORMATTED WITH_UNITS 30
LABELVALUE COSMOS VERSION COSMOS
END
END
END
Expand Down
2 changes: 1 addition & 1 deletion demo/config/tools/test_runner/test_runner.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LOAD_UTILITY 'example_test'
REQUIRE_UTILITY 'example_test'
LINE_DELAY 0
# RESULTS_WRITER 'results_writer.rb'
ALLOW_DEBUG
Expand Down
8 changes: 6 additions & 2 deletions demo/lib/example_background_task.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# encoding: ascii-8bit

# Copyright 2014 Ball Aerospace & Technologies Corp.
# Copyright 2017 Ball Aerospace & Technologies Corp.
# All Rights Reserved.
#
# This program is free software; you can modify and/or redistribute it
Expand All @@ -25,13 +25,17 @@ def call
@sleeper = Sleeper.new
@status = "Sleeping for 5 seconds"
return if @sleeper.sleep(5) # allow interfaces time to start
initial_count = tlm('INST', 'HEALTH_STATUS', 'COLLECTS')
loop do
# Start up with at least 3 collects
if (tlm('INST', 'HEALTH_STATUS', 'COLLECTS') < 3)
count = tlm('INST', 'HEALTH_STATUS', 'COLLECTS')
if (count < (initial_count + 3))
begin
cmd('INST', 'COLLECT', 'TYPE' => 'NORMAL', 'DURATION' => 1)
sent_count += 1
@status = "Sent COLLECT ##{sent_count} at #{Time.now.sys.formatted}"
wait("INST HEALTH_STATUS COLLECTS > #{count}", 5)
@status = "Tlm Updated at #{Time.now.sys.formatted}"
rescue
# Oh well - probably disconnected
end
Expand Down
Loading

0 comments on commit 697b1c3

Please sign in to comment.