mirror of
https://github.com/blw1138/MercurySim.git
synced 2026-04-25 05:44:55 -05:00
Update permissions
This commit is contained in:
Regular → Executable
+3
@@ -1,3 +1,6 @@
|
||||
/Source Audio/
|
||||
/venv/
|
||||
/src/audio/
|
||||
/src/video/
|
||||
.idea/
|
||||
**/__pycache__/
|
||||
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
+9
-10
@@ -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)
|
||||
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
|
Before Width: | Height: | Size: 733 KiB After Width: | Height: | Size: 733 KiB |
Reference in New Issue
Block a user