25 lines
819 B
Python
25 lines
819 B
Python
|
import enum
|
||
|
from tmtccmd.tc.definitions import TcQueueT
|
||
|
from tmtccmd.pus.service_list import PusServices
|
||
|
from tmtccmd.tc.service_200_mode import pack_mode_data, Modes
|
||
|
from tmtccmd.tc.packer import PusTelecommand
|
||
|
from config.object_ids import MGM_0_HANDLER_ID, MGM_1_HANDLER_ID, MGM_2_HANDLER_ID, MGM_3_HANDLER_ID
|
||
|
|
||
|
|
||
|
class AcsOpCodes(enum.Enum):
|
||
|
# Switch on A side
|
||
|
ON_MGM_0 = "0"
|
||
|
ON_MGM_1 = "1"
|
||
|
ON_GYRO_0 = "2"
|
||
|
ON_GYRO_1 = "3"
|
||
|
# Switch on B side
|
||
|
ON_MGM_2 = "4"
|
||
|
ON_MGM_3 = "5"
|
||
|
ON_GYRO_2 = "6"
|
||
|
ON_GYRO_3 = "7"
|
||
|
|
||
|
|
||
|
def pack_acs_command(tc_queue: TcQueueT, op_code: str):
|
||
|
if op_code == AcsOpCodes.ON_MGM_0.value:
|
||
|
app_data = pack_mode_data(object_id=MGM_0_HANDLER_ID, mode=Modes.ON, submode=0)
|
||
|
# return PusTelecommand(service=PusServices.SERVICE_200_MODE, subservice=)
|