v1.9.0 #53

Merged
muellerr merged 354 commits from develop into master 2022-04-07 17:39:42 +02:00
5 changed files with 33 additions and 11 deletions
Showing only changes of commit fd01098345 - Show all commits

27
lint.py
View File

@ -4,18 +4,33 @@ import sys
def main(): def main():
# Ignore folder created by venv exclude_dirs_flag = ""
exclude_dirs_flag = "--exclude bin,lib" if not os.path.exists("setup.cfg"):
exclude_dirs_flag = (
"--exclude .git,__pycache__,docs/conf.py,old,build,dist,venv"
)
additional_flags_both_steps = "--count --statistics" additional_flags_both_steps = "--count --statistics"
additional_flags_first_step = "--select=E9,F63,F7,F82 --show-source" additional_flags_first_step = "--select=E9,F63,F7,F82 --show-source"
flake8_first_step_cmd = f"flake8 . {additional_flags_both_steps} {additional_flags_first_step} {exclude_dirs_flag}" flake8_first_step_cmd = (
f"flake8 . {additional_flags_both_steps} "
f"{additional_flags_first_step} {exclude_dirs_flag}"
)
status = os.system(flake8_first_step_cmd) status = os.system(flake8_first_step_cmd)
if os.name == "nt":
if status != 0:
print(f"Flake8 linter errors with status {status}")
else:
if os.WEXITSTATUS(status) != 0: if os.WEXITSTATUS(status) != 0:
print("Flake8 linter errors") print(f"Flake8 linter errors with status {status}")
sys.exit(0) sys.exit(0)
additional_flags_second_step = (
'--exit-zero --max-complexity=10 --per-file-ignores="__init__.py:F401"'
)
if not os.path.exists("setup.cfg"):
additional_flags_second_step += " --max-line-length=100"
flake8_second_step_cmd = ( flake8_second_step_cmd = (
f"flake8 . {additional_flags_both_steps} --exit-zero --max-complexity=10 " f"flake8 . {additional_flags_both_steps} {additional_flags_second_step}"
f"--max-line-length=127 {exclude_dirs_flag}" f" {exclude_dirs_flag}"
) )
os.system(flake8_second_step_cmd) os.system(flake8_second_step_cmd)

View File

@ -3,6 +3,7 @@ import enum
from tmtccmd.config import QueueCommands from tmtccmd.config import QueueCommands
from tmtccmd.tc.definitions import TcQueueT from tmtccmd.tc.definitions import TcQueueT
from tmtccmd.tc.service_200_mode import pack_mode_data, Modes, Subservices from tmtccmd.tc.service_200_mode import pack_mode_data, Modes, Subservices
from tmtccmd.tc.service_20_parameter import pack_boolean_parameter_command
from spacepackets.ecss.tc import PusTelecommand from spacepackets.ecss.tc import PusTelecommand
from config.object_ids import PL_PCDU_ID from config.object_ids import PL_PCDU_ID
@ -10,6 +11,7 @@ from config.object_ids import PL_PCDU_ID
class OpCodes: class OpCodes:
SWITCH_ADC_ON = ["0", "switch-adc-on"] SWITCH_ADC_ON = ["0", "switch-adc-on"]
SWITCH_ALL_ON = ["1", "switch-all-on"] SWITCH_ALL_ON = ["1", "switch-all-on"]
UPDATE_DRO_TO_X8_WAIT = ["2", "dro-to-x8-wait"]
class Submodes(enum.IntEnum): class Submodes(enum.IntEnum):
@ -36,3 +38,6 @@ def pack_pl_pcdu_commands(tc_queue: TcQueueT, op_code: str):
service=200, subservice=Subservices.SWITCH_MODE, app_data=mode_data service=200, subservice=Subservices.SWITCH_MODE, app_data=mode_data
) )
tc_queue.appendleft(mode_cmd.pack_command_tuple()) tc_queue.appendleft(mode_cmd.pack_command_tuple())
if op_code in OpCodes.UPDATE_DRO_TO_X8_WAIT:
tc_queue.appendleft((QueueCommands.PRINT, "Updating DRO to X8 wait time"))
param_data =

View File

@ -95,7 +95,9 @@ class FileDefs:
) )
q7s_ground_config = "/mnt/sd0/startracker/json/ground-config.json" q7s_ground_config = "/mnt/sd0/startracker/json/ground-config.json"
q7s_flight_config = "/mnt/sd0/startracker/flight-config.json" q7s_flight_config = "/mnt/sd0/startracker/flight-config.json"
firmware2_1 = ""
firmware22_1 = ""
firmware_origin = ""
json_dict = { json_dict = {
"1": ["Q7S flight config", FileDefs.q7s_flight_config], "1": ["Q7S flight config", FileDefs.q7s_flight_config],

@ -1 +1 @@
Subproject commit 8580a08e9876efc542e19dc957f220be3b250dc8 Subproject commit 19e8a588fa0723a5991f80bb2fd52dfc64f0ac64

@ -1 +1 @@
Subproject commit f7bbf4bd9f6dc169a8b9e6a76fa9ef0aceb341d4 Subproject commit 9af8340c0276460128bd343139bc6e20bf020f6a