mirror of
https://github.com/blw1138/MercurySim.git
synced 2025-12-17 08:38:12 +00:00
Update permissions
This commit is contained in:
3
.gitignore
vendored
Normal file → Executable file
3
.gitignore
vendored
Normal file → Executable file
@@ -1,3 +1,6 @@
|
||||
/Source Audio/
|
||||
/venv/
|
||||
/src/audio/
|
||||
/src/video/
|
||||
.idea/
|
||||
**/__pycache__/
|
||||
|
||||
0
MercuryController/MercuryController.ino
Normal file → Executable file
0
MercuryController/MercuryController.ino
Normal file → Executable file
0
src/MercuryController.py
Normal file → Executable file
0
src/MercuryController.py
Normal file → Executable file
19
src/SimController.py
Normal file → Executable file
19
src/SimController.py
Normal file → Executable file
@@ -1,4 +1,4 @@
|
||||
#! /usr/bin/env python
|
||||
|
||||
import datetime
|
||||
import math
|
||||
import sys
|
||||
@@ -7,7 +7,6 @@ import time
|
||||
import subprocess
|
||||
import random
|
||||
import csv
|
||||
import serial
|
||||
import json
|
||||
# import keyboard
|
||||
import logging
|
||||
@@ -16,6 +15,9 @@ from threading import Thread
|
||||
from distutils.spawn import find_executable
|
||||
from MercuryController import *
|
||||
|
||||
SECONDS_PER_MINUTE = 60
|
||||
SECONDS_PER_HOUR = 3600
|
||||
|
||||
|
||||
class MercurySim:
|
||||
def __init__(self):
|
||||
@@ -170,9 +172,7 @@ class MercurySim:
|
||||
|
||||
def run_scene(self, scene_number):
|
||||
|
||||
logging.info('')
|
||||
|
||||
logging.info('{:-^40}'.format(' Starting Scene #{} '.format(scene_number)))
|
||||
logging.info('\n{:-^40}'.format(' Starting Scene #{} '.format(scene_number)))
|
||||
|
||||
scene = self.scenes[scene_number]
|
||||
play_video(scene['video'], loop=True, random_orientation=True)
|
||||
@@ -430,8 +430,6 @@ def t_time_to_seconds(t_time_val):
|
||||
|
||||
def time_to_seconds(hours=0, minutes=0, seconds=0):
|
||||
# Define the constants
|
||||
SECONDS_PER_MINUTE = 60
|
||||
SECONDS_PER_HOUR = 3600
|
||||
total_seconds = int(hours) * SECONDS_PER_HOUR
|
||||
total_seconds = total_seconds + (int(minutes) * SECONDS_PER_MINUTE)
|
||||
total_seconds = total_seconds + int(seconds)
|
||||
@@ -455,11 +453,12 @@ def formatted_time(time_val):
|
||||
return "%02d:%02d:%02d" % (hour, minutes, seconds)
|
||||
|
||||
|
||||
def t_time(time):
|
||||
prefix = "T-" if time < 0 else "T+"
|
||||
t_time = prefix + formatted_time(time)
|
||||
def t_time(time_val):
|
||||
prefix = "T-" if time_val < 0 else "T+"
|
||||
t_time = prefix + formatted_time(time_val)
|
||||
return t_time
|
||||
|
||||
|
||||
def interpolated_value(start_time, start_val, end_time, end_val, current_time, rate):
|
||||
|
||||
multiplier = math.pow(current_time-start_time, rate) / math.pow(end_time-start_time, rate)
|
||||
|
||||
0
src/audio/convert_all.sh
Normal file → Executable file
0
src/audio/convert_all.sh
Normal file → Executable file
0
src/config.json
Normal file → Executable file
0
src/config.json
Normal file → Executable file
0
src/events-accurate.csv
Normal file → Executable file
0
src/events-accurate.csv
Normal file → Executable file
0
src/events.csv
Normal file → Executable file
0
src/events.csv
Normal file → Executable file
0
src/events_launch.csv
Normal file → Executable file
0
src/events_launch.csv
Normal file → Executable file
0
src/events_reentry.csv
Normal file → Executable file
0
src/events_reentry.csv
Normal file → Executable file
0
src/led_mapping.csv
Normal file → Executable file
0
src/led_mapping.csv
Normal file → Executable file
0
src/scenes.csv
Normal file → Executable file
0
src/scenes.csv
Normal file → Executable file
0
src/servo_mapping.csv
Normal file → Executable file
0
src/servo_mapping.csv
Normal file → Executable file
0
src/stars.jpg
Normal file → Executable file
0
src/stars.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 733 KiB After Width: | Height: | Size: 733 KiB |
Reference in New Issue
Block a user