spacepackets and tmtc update
This commit is contained in:
parent
56d414d9fc
commit
fd01098345
31
lint.py
31
lint.py
@ -4,18 +4,33 @@ import sys
|
||||
|
||||
|
||||
def main():
|
||||
# Ignore folder created by venv
|
||||
exclude_dirs_flag = "--exclude bin,lib"
|
||||
exclude_dirs_flag = ""
|
||||
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_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)
|
||||
if os.WEXITSTATUS(status) != 0:
|
||||
print("Flake8 linter errors")
|
||||
sys.exit(0)
|
||||
if os.name == "nt":
|
||||
if status != 0:
|
||||
print(f"Flake8 linter errors with status {status}")
|
||||
else:
|
||||
if os.WEXITSTATUS(status) != 0:
|
||||
print(f"Flake8 linter errors with status {status}")
|
||||
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 = (
|
||||
f"flake8 . {additional_flags_both_steps} --exit-zero --max-complexity=10 "
|
||||
f"--max-line-length=127 {exclude_dirs_flag}"
|
||||
f"flake8 . {additional_flags_both_steps} {additional_flags_second_step}"
|
||||
f" {exclude_dirs_flag}"
|
||||
)
|
||||
os.system(flake8_second_step_cmd)
|
||||
|
||||
|
@ -3,6 +3,7 @@ import enum
|
||||
from tmtccmd.config import QueueCommands
|
||||
from tmtccmd.tc.definitions import TcQueueT
|
||||
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 config.object_ids import PL_PCDU_ID
|
||||
|
||||
@ -10,6 +11,7 @@ from config.object_ids import PL_PCDU_ID
|
||||
class OpCodes:
|
||||
SWITCH_ADC_ON = ["0", "switch-adc-on"]
|
||||
SWITCH_ALL_ON = ["1", "switch-all-on"]
|
||||
UPDATE_DRO_TO_X8_WAIT = ["2", "dro-to-x8-wait"]
|
||||
|
||||
|
||||
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
|
||||
)
|
||||
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 =
|
@ -95,7 +95,9 @@ class FileDefs:
|
||||
)
|
||||
q7s_ground_config = "/mnt/sd0/startracker/json/ground-config.json"
|
||||
q7s_flight_config = "/mnt/sd0/startracker/flight-config.json"
|
||||
|
||||
firmware2_1 = ""
|
||||
firmware22_1 = ""
|
||||
firmware_origin = ""
|
||||
|
||||
json_dict = {
|
||||
"1": ["Q7S flight config", FileDefs.q7s_flight_config],
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 8580a08e9876efc542e19dc957f220be3b250dc8
|
||||
Subproject commit 19e8a588fa0723a5991f80bb2fd52dfc64f0ac64
|
2
tmtccmd
2
tmtccmd
@ -1 +1 @@
|
||||
Subproject commit f7bbf4bd9f6dc169a8b9e6a76fa9ef0aceb341d4
|
||||
Subproject commit 9af8340c0276460128bd343139bc6e20bf020f6a
|
Loading…
Reference in New Issue
Block a user