diff --git a/.idea/runConfigurations/RW1_Test.xml b/.idea/runConfigurations/RW1_Test.xml
index 69a1cd0..c013f3d 100644
--- a/.idea/runConfigurations/RW1_Test.xml
+++ b/.idea/runConfigurations/RW1_Test.xml
@@ -6,14 +6,14 @@
-
+
-
+
diff --git a/.idea/runConfigurations/RW2_Test_.xml b/.idea/runConfigurations/RW2_Test_.xml
index 3c8d71d..cd2434f 100644
--- a/.idea/runConfigurations/RW2_Test_.xml
+++ b/.idea/runConfigurations/RW2_Test_.xml
@@ -6,14 +6,14 @@
-
+
-
+
diff --git a/.idea/runConfigurations/RW3_Test_.xml b/.idea/runConfigurations/RW3_Test_.xml
index f874325..6c98750 100644
--- a/.idea/runConfigurations/RW3_Test_.xml
+++ b/.idea/runConfigurations/RW3_Test_.xml
@@ -6,14 +6,14 @@
-
+
-
+
diff --git a/.idea/runConfigurations/RW4_Test_.xml b/.idea/runConfigurations/RW4_Test_.xml
index eaca002..70d9620 100644
--- a/.idea/runConfigurations/RW4_Test_.xml
+++ b/.idea/runConfigurations/RW4_Test_.xml
@@ -6,14 +6,14 @@
-
+
-
+
diff --git a/.idea/runConfigurations/tmtcclient_Heater_Test_UDP.xml b/.idea/runConfigurations/tmtcclient_Heater_Test_UDP.xml
new file mode 100644
index 0000000..a5895ff
--- /dev/null
+++ b/.idea/runConfigurations/tmtcclient_Heater_Test_UDP.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/tmtcclient_IMTQ_Command_Dipole.xml b/.idea/runConfigurations/tmtcclient_IMTQ_Command_Dipole.xml
new file mode 100644
index 0000000..e532c40
--- /dev/null
+++ b/.idea/runConfigurations/tmtcclient_IMTQ_Command_Dipole.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/tmtcclient_IMTQ_Get_Commanded_Dipole.xml b/.idea/runConfigurations/tmtcclient_IMTQ_Get_Commanded_Dipole.xml
new file mode 100644
index 0000000..7da3192
--- /dev/null
+++ b/.idea/runConfigurations/tmtcclient_IMTQ_Get_Commanded_Dipole.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/tmtcclient_IMTQ_Neg_X_Test.xml b/.idea/runConfigurations/tmtcclient_IMTQ_Neg_X_Test.xml
new file mode 100644
index 0000000..ae172c6
--- /dev/null
+++ b/.idea/runConfigurations/tmtcclient_IMTQ_Neg_X_Test.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/tmtcclient_IMTQ_Neg_Y_Test.xml b/.idea/runConfigurations/tmtcclient_IMTQ_Neg_Y_Test.xml
new file mode 100644
index 0000000..7a9c86d
--- /dev/null
+++ b/.idea/runConfigurations/tmtcclient_IMTQ_Neg_Y_Test.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/tmtcclient_IMTQ_Neg_Z_Test.xml b/.idea/runConfigurations/tmtcclient_IMTQ_Neg_Z_Test.xml
new file mode 100644
index 0000000..5319fbe
--- /dev/null
+++ b/.idea/runConfigurations/tmtcclient_IMTQ_Neg_Z_Test.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/tmtcclient_IMTQ_Pos_X_Test.xml b/.idea/runConfigurations/tmtcclient_IMTQ_Pos_X_Test.xml
new file mode 100644
index 0000000..2e73364
--- /dev/null
+++ b/.idea/runConfigurations/tmtcclient_IMTQ_Pos_X_Test.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/tmtcclient_IMTQ_Pos_Y_Test.xml b/.idea/runConfigurations/tmtcclient_IMTQ_Pos_Y_Test.xml
new file mode 100644
index 0000000..d3a129d
--- /dev/null
+++ b/.idea/runConfigurations/tmtcclient_IMTQ_Pos_Y_Test.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/tmtcclient_IMTQ_Pos_Z_Test.xml b/.idea/runConfigurations/tmtcclient_IMTQ_Pos_Z_Test.xml
new file mode 100644
index 0000000..73fcd50
--- /dev/null
+++ b/.idea/runConfigurations/tmtcclient_IMTQ_Pos_Z_Test.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/tmtcclient_IMTQ_Test_UDP.xml b/.idea/runConfigurations/tmtcclient_IMTQ_Test_UDP.xml
new file mode 100644
index 0000000..6413dc4
--- /dev/null
+++ b/.idea/runConfigurations/tmtcclient_IMTQ_Test_UDP.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/tmtcclient_PLOC_Test_UDP_Flatsat.xml b/.idea/runConfigurations/tmtcclient_PLOC_Test_UDP_Flatsat.xml
new file mode 100644
index 0000000..81d46a6
--- /dev/null
+++ b/.idea/runConfigurations/tmtcclient_PLOC_Test_UDP_Flatsat.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/tmtcclient_PLOC_Test_UDP_Local.xml b/.idea/runConfigurations/tmtcclient_PLOC_Test_UDP_Local.xml
new file mode 100644
index 0000000..409787b
--- /dev/null
+++ b/.idea/runConfigurations/tmtcclient_PLOC_Test_UDP_Local.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/tmtcclient_S_A_Deployment_Test_UDP.xml b/.idea/runConfigurations/tmtcclient_S_A_Deployment_Test_UDP.xml
new file mode 100644
index 0000000..bd78fc6
--- /dev/null
+++ b/.idea/runConfigurations/tmtcclient_S_A_Deployment_Test_UDP.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/tmtcclient_Syrlinks_Test_UDP.xml b/.idea/runConfigurations/tmtcclient_Syrlinks_Test_UDP.xml
new file mode 100644
index 0000000..d3eb8eb
--- /dev/null
+++ b/.idea/runConfigurations/tmtcclient_Syrlinks_Test_UDP.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/tmtcclient_TMP1075_1_Dock_Test_UDP.xml b/.idea/runConfigurations/tmtcclient_TMP1075_1_Dock_Test_UDP.xml
new file mode 100644
index 0000000..2670a02
--- /dev/null
+++ b/.idea/runConfigurations/tmtcclient_TMP1075_1_Dock_Test_UDP.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/tmtcclient_TMP1075_2_Dock_Test_UDP.xml b/.idea/runConfigurations/tmtcclient_TMP1075_2_Dock_Test_UDP.xml
new file mode 100644
index 0000000..d1043e9
--- /dev/null
+++ b/.idea/runConfigurations/tmtcclient_TMP1075_2_Dock_Test_UDP.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/config/hook_implementations.py b/config/hook_implementations.py
index 9b1a7a3..fb87d57 100644
--- a/config/hook_implementations.py
+++ b/config/hook_implementations.py
@@ -10,6 +10,7 @@ from tmtccmd.core.backend import TmTcHandler
from tmtccmd.config.hook import TmTcHookBase
from tmtccmd.utility.tmtc_printer import TmTcPrinter
from tmtccmd.config.globals import OpCodeDictKeys
+from config.object_ids import RW1_ID
from config.definitions import CustomServiceList
@@ -66,6 +67,9 @@ class EiveHookObject(TmTcHookBase):
op_code_dict_srv_rw = {
"0": ("Reaction Wheel: Run all commands", {OpCodeDictKeys.TIMEOUT: 2.0}),
"1": ("Reaction Wheel: Set speed", {OpCodeDictKeys.TIMEOUT: 2.0}),
+ "2": ("Reaction Wheel: Set mode on", {OpCodeDictKeys.TIMEOUT: 2.0}),
+ "3": ("Reaction Wheel: Set mode normal", {OpCodeDictKeys.TIMEOUT: 2.0}),
+ "4": ("Reaction Wheel: Set mode off", {OpCodeDictKeys.TIMEOUT: 2.0}),
}
service_rw_tuple = ("Reaction Wheel", op_code_dict_srv_rw)
@@ -75,10 +79,12 @@ class EiveHookObject(TmTcHookBase):
service_op_code_dict[CustomServiceList.P60DOCK.value] = service_p60_tuple
service_op_code_dict[CustomServiceList.PDU1.value] = service_pdu1_tuple
service_op_code_dict[CustomServiceList.PDU1.value] = service_pdu2_tuple
- service_op_code_dict[CustomServiceList.PDU1.value] = service_pdu2_tuple
service_op_code_dict[CustomServiceList.HEATER.value] = service_heater_tuple
service_op_code_dict[CustomServiceList.IMTQ.value] = service_imtq_tuple
- service_op_code_dict[CustomServiceList.REACTION_WHEEL.value] = service_rw_tuple
+ service_op_code_dict[CustomServiceList.REACTION_WHEEL_1.value] = service_rw_tuple
+ service_op_code_dict[CustomServiceList.REACTION_WHEEL_2.value] = service_rw_tuple
+ service_op_code_dict[CustomServiceList.REACTION_WHEEL_3.value] = service_rw_tuple
+ service_op_code_dict[CustomServiceList.REACTION_WHEEL_4.value] = service_rw_tuple
return service_op_code_dict
def get_json_config_file_path(self) -> str:
@@ -141,3 +147,12 @@ class EiveHookObject(TmTcHookBase):
return handle_user_hk_packet(
object_id=object_id, set_id=set_id, hk_data=hk_data, service3_packet=service3_packet
)
+
+ @staticmethod
+ def handle_service_5_event(
+ object_id: bytes, event_id: int, param_1: int, param_2: int
+ ) -> str:
+ if object_id == RW1_ID:
+ if event_id == 1:
+ return ""
+ return ""
diff --git a/pus_tc/reaction_wheels.py b/pus_tc/reaction_wheels.py
index 3aaa411..2470f12 100644
--- a/pus_tc/reaction_wheels.py
+++ b/pus_tc/reaction_wheels.py
@@ -10,6 +10,7 @@ from tmtccmd.config.definitions import QueueCommands
from tmtccmd.pus_tc.packer import TcQueueT
from tmtccmd.ecss.tc import PusTelecommand
+from pus_tc.service_200_mode import pack_mode_data
from tmtccmd.pus_tc.service_3_housekeeping import make_sid, generate_one_hk_command
@@ -44,16 +45,30 @@ def pack_single_rw_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code:
)
if op_code == "0" or op_code == "1":
+ speed = int(input("Specify speed [0.1 RPM]: "))
+ ramp_time = int(input("Specify ramp time [ms]: "))
tc_queue.appendleft((QueueCommands.PRINT, "Reaction Wheel: Set speed"))
- command = pack_set_speed_command(object_id, 0, 1000)
+ command = pack_set_speed_command(object_id, speed, ramp_time)
command = PusTelecommand(service=8, subservice=128, ssc=40, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
- # tc_queue.appendleft((QueueCommands.PRINT, "Reaction Wheel: Init reaction wheel controller"))
- # command = object_id + RwCommandIds.INIT_RW_CONTROLLER
- # command = PusTelecommand(service=8, subservice=128, ssc=41, app_data=command)
- # tc_queue.appendleft(command.pack_command_tuple())
+ if op_code == "2":
+ tc_queue.appendleft((QueueCommands.PRINT, "Reaction Wheel: Switch to mode on"))
+ mode_data = pack_mode_data(object_id, 1, 0)
+ command = PusTelecommand(service=200, subservice=1, ssc=41, app_data=mode_data)
+ tc_queue.appendleft(command.pack_command_tuple())
+ if op_code == "3":
+ tc_queue.appendleft((QueueCommands.PRINT, "Reaction Wheel: Switch to mode normal"))
+ mode_data = pack_mode_data(object_id, 2, 0)
+ command = PusTelecommand(service=200, subservice=1, ssc=42, app_data=mode_data)
+ tc_queue.appendleft(command.pack_command_tuple())
+
+ if op_code == "4":
+ tc_queue.appendleft((QueueCommands.PRINT, "Reaction Wheel: Switch to mode off"))
+ mode_data = pack_mode_data(object_id, 0, 0)
+ command = PusTelecommand(service=200, subservice=1, ssc=43, app_data=mode_data)
+ tc_queue.appendleft(command.pack_command_tuple())
return tc_queue