diff --git a/my_mod/tlm_buffer.py b/my_mod/tlm_buffer.py index a043d81..653724b 100644 --- a/my_mod/tlm_buffer.py +++ b/my_mod/tlm_buffer.py @@ -317,7 +317,9 @@ def GenerateTlmBuffer(settings, other_obc_dbs): body_c += "{{\n" body_c += " const CommonTlmPacket* buffered_packet;\n" body_c += "\n" - body_c += " if (tlm_id >= {_obc_name_upper}_MAX_TLM_NUM) return TF_TLM_FUNC_ACK_NOT_DEFINED;\n" + body_c += ( + " if (tlm_id >= {_obc_name_upper}_MAX_TLM_NUM) return TF_TLM_FUNC_ACK_NOT_DEFINED;\n" + ) body_c += ( " if (" + driver_name diff --git a/my_mod/tlm_def.py b/my_mod/tlm_def.py index 5350f68..3c52255 100644 --- a/my_mod/tlm_def.py +++ b/my_mod/tlm_def.py @@ -18,7 +18,11 @@ def GenerateTlmDef(settings, tlm_db, other_obc_dbs): # "static TF_TLM_FUNC_ACK OBC_(uint8_t* packet, uint16_t* len, uint16_t max_len);" # " OBC_ID = 0x00," for tlm in tlm_db: - body_c += "static TF_TLM_FUNC_ACK Tlm_" + tlm["tlm_name"].upper() + "_(uint8_t* packet, uint16_t* len, uint16_t max_len);\n" + body_c += ( + "static TF_TLM_FUNC_ACK Tlm_" + + tlm["tlm_name"].upper() + + "_(uint8_t* packet, uint16_t* len, uint16_t max_len);\n" + ) body_h += " Tlm_CODE_" + tlm["tlm_name"].upper() + " = " + tlm["tlm_id"] + ",\n" if settings["is_main_obc"]: @@ -95,7 +99,11 @@ def GenerateTlmDef(settings, tlm_db, other_obc_dbs): func_code += "(&packet[" + str(pos) + "], " + code + ");\n" body_c += "\n" - body_c += "static TF_TLM_FUNC_ACK Tlm_" + tlm["tlm_name"].upper() + "_(uint8_t* packet, uint16_t* len, uint16_t max_len)\n" + body_c += ( + "static TF_TLM_FUNC_ACK Tlm_" + + tlm["tlm_name"].upper() + + "_(uint8_t* packet, uint16_t* len, uint16_t max_len)\n" + ) body_c += "{\n" for local_var in tlm["local_vars"]: body_c += " " + local_var + "\n" @@ -134,7 +142,9 @@ def GetTlmDefCOfOtherObcFunDef_(settings, tlm_db, other_obc_dbs): temp_c += "// {_obc_name_upper} TLM\n" for tlm in oter_obc_tlm_db: temp_c += ( - "static TF_TLM_FUNC_ACK Tlm_" + tlm["tlm_name"].upper() + "_(uint8_t* packet, uint16_t* len, uint16_t max_len);\n" + "static TF_TLM_FUNC_ACK Tlm_" + + tlm["tlm_name"].upper() + + "_(uint8_t* packet, uint16_t* len, uint16_t max_len);\n" ) body_c += temp_c.format( @@ -193,7 +203,11 @@ def GetTlmDefCOfOtherObcFunBody_(settings, tlm_db, other_obc_dbs): tlm_name_upper = tlm_name.upper() # tlm_name_lower = tlm_name.lower() temp_c += "\n" - temp_c += "static TF_TLM_FUNC_ACK Tlm_" + tlm_name_upper + "_(uint8_t* packet, uint16_t* len, uint16_t max_len)\n" + temp_c += ( + "static TF_TLM_FUNC_ACK Tlm_" + + tlm_name_upper + + "_(uint8_t* packet, uint16_t* len, uint16_t max_len)\n" + ) temp_c += "{{\n" temp_c += ( " return {_obc_name_upper}_pick_up_tlm_buffer("