fixed conflicts
This commit is contained in:
@ -32,6 +32,8 @@ MANUAL_INPUT = "1"
|
||||
update_file_dict = {
|
||||
MANUAL_INPUT: ["manual input", ""],
|
||||
"2": ["/mnt/sd0/ploc/supervisor/update.bin", "/mnt/sd0/ploc/supervisor/update.bin"],
|
||||
"3": ["/mnt/sd0/ploc/supervisor/update-large.bin", "/mnt/sd0/ploc/supervisor/update-large.bin"],
|
||||
"4": ["/mnt/sd0/ploc/supervisor/update-small.bin", "/mnt/sd0/ploc/supervisor/update-small.bin"],
|
||||
}
|
||||
|
||||
event_buffer_path_dict = {
|
||||
@ -86,6 +88,7 @@ class SupvActionIds:
|
||||
LOGGING_CLEAR_COUNTERS = 55
|
||||
LOGGING_SET_TOPIC = 56
|
||||
REQUEST_ADC_REPORT = 57
|
||||
RESET_PL = 58
|
||||
|
||||
|
||||
class SupvHkIds:
|
||||
@ -283,7 +286,7 @@ def pack_ploc_supv_commands(
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT, "PLOC Supervisor: Factory reset clear mirror entries")
|
||||
)
|
||||
command = command = object_id + struct.pack(
|
||||
command = object_id + struct.pack(
|
||||
"!I", SupvActionIds.FACTORY_RESET_CLEAR_MIRROR
|
||||
)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=54, app_data=command)
|
||||
@ -386,6 +389,11 @@ def pack_ploc_supv_commands(
|
||||
command = object_id + struct.pack('!I', SupvActionIds.REQUEST_ADC_REPORT)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=70, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "56":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Reset PL"))
|
||||
command = object_id + struct.pack('!I', SupvActionIds.RESET_PL)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=71, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
return tc_queue
|
||||
|
||||
@ -400,7 +408,6 @@ def pack_sel_boot_image_cmd(
|
||||
@param bp1 Partition pin 1
|
||||
@param bp2 Partition pin 2
|
||||
"""
|
||||
command = bytearray()
|
||||
command = object_id + struct.pack("!I", SupvActionIds.SEL_MPSOC_BOOT_IMAGE)
|
||||
command = command + struct.pack("!B", mem)
|
||||
command = command + struct.pack("!B", bp0)
|
||||
@ -419,7 +426,6 @@ def pack_update_available_cmd(object_id: bytearray) -> bytearray:
|
||||
image_size = 222
|
||||
image_crc = 0x0
|
||||
number_of_packets = 150
|
||||
command = bytearray()
|
||||
command = object_id + struct.pack("!I", SupvActionIds.UPDATE_AVAILABLE)
|
||||
command = command + struct.pack("!B", image_select)
|
||||
command = command + struct.pack("!B", image_partition)
|
||||
@ -525,11 +531,10 @@ def pack_set_adc_enabled_channels_cmd(object_id: bytearray) -> bytearray:
|
||||
@brief This function packs the command to enable or disable channels of the ADC.
|
||||
@param object_id The object id of the PLOC supervisor handler.
|
||||
"""
|
||||
ch = int(input("Specify ch: "))
|
||||
command = bytearray()
|
||||
command = object_id + struct.pack("!I", SupvActionIds.SET_ADC_ENABLED_CHANNELS)
|
||||
command = command + struct.pack("!H", ch)
|
||||
return command
|
||||
ch = int(input("Specify ch: 0x"), 16)
|
||||
cmd = object_id + struct.pack("!I", SupvActionIds.SET_ADC_ENABLED_CHANNELS)
|
||||
cmd = cmd + struct.pack("!H", ch)
|
||||
return cmd
|
||||
|
||||
|
||||
def pack_set_adc_window_and_stride_cmd(object_id: bytearray) -> bytearray:
|
||||
@ -610,9 +615,9 @@ def pack_logging_buffer_request(object_id: bytearray) -> bytearray:
|
||||
|
||||
|
||||
def pack_set_gpio_cmd(object_id: bytearray) -> bytearray:
|
||||
port = int(input("Specify port: "))
|
||||
pin = int(input("Specify pin: "))
|
||||
val = int(input("Specify val: "))
|
||||
port = int(input("Specify port : 0x"), 16)
|
||||
pin = int(input("Specify pin: 0x"), 16)
|
||||
val = int(input("Specify val: 0x"), 16)
|
||||
command = object_id + struct.pack("!I", SupvActionIds.SET_GPIO)
|
||||
command = command + struct.pack("!B", port)
|
||||
command = command + struct.pack("!B", pin)
|
||||
@ -621,8 +626,8 @@ def pack_set_gpio_cmd(object_id: bytearray) -> bytearray:
|
||||
|
||||
|
||||
def pack_read_gpio_cmd(object_id: bytearray) -> bytearray:
|
||||
port = int(input("Specify port: "))
|
||||
pin = int(input("Specify pin: "))
|
||||
port = int(input("Specify port: 0x"), 16)
|
||||
pin = int(input("Specify pin: 0x"), 16)
|
||||
command = object_id + struct.pack("!I", SupvActionIds.READ_GPIO)
|
||||
command = command + struct.pack("!B", port)
|
||||
command = command + struct.pack("!B", pin)
|
||||
|
Reference in New Issue
Block a user