diff --git a/copter_modification.json b/copter_modification.json index 0df6e8d..fc24999 100644 --- a/copter_modification.json +++ b/copter_modification.json @@ -94,13 +94,28 @@ "path": "libraries/AP_HAL_ChibiOS/HAL_ChibiOS_Class.cpp", "comment_style": "//", "insertions": [ + { + "line": 139, + "type": "insert", + "tag": "empty-uart", + "code": [ + "#if defined(SIMULINK_APP_ENABLED) && defined(DISABLE_TELEM1_CONSOLE)", + " static Empty::UARTDriver serialEmptyDriver;", + "#endif" + ] + }, + { "line": 160, "type": "replace", "tag": "simulink-disable-console", "code": [ "#if defined(SIMULINK_APP_ENABLED) && defined(DISABLE_MAVLINK_USB)", + " #ifndef DISABLE_TELEM1_CONSOLE", " &serial1Driver,", + " #else", + " &serialEmptyDriver,", + " #endif", "#else", " &serial0Driver,", "#endif" diff --git a/plane_modification.json b/plane_modification.json index 84aaafb..bb75ff2 100644 --- a/plane_modification.json +++ b/plane_modification.json @@ -94,13 +94,28 @@ "path": "libraries/AP_HAL_ChibiOS/HAL_ChibiOS_Class.cpp", "comment_style": "//", "insertions": [ + { + "line": 139, + "type": "insert", + "tag": "empty-uart", + "code": [ + "#if defined(SIMULINK_APP_ENABLED) && defined(DISABLE_TELEM1_CONSOLE)", + " static Empty::UARTDriver serialEmptyDriver;", + "#endif" + ] + }, + { "line": 160, "type": "replace", "tag": "simulink-disable-console", "code": [ "#if defined(SIMULINK_APP_ENABLED) && defined(DISABLE_MAVLINK_USB)", + " #ifndef DISABLE_TELEM1_CONSOLE", " &serial1Driver,", + " #else", + " &serialEmptyDriver,", + " #endif", "#else", " &serial0Driver,", "#endif"