Skip to content

Commit 67ab318

Browse files
Console port configuration
1 parent 7595391 commit 67ab318

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

copter_modification.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,28 @@
9494
"path": "libraries/AP_HAL_ChibiOS/HAL_ChibiOS_Class.cpp",
9595
"comment_style": "//",
9696
"insertions": [
97+
{
98+
"line": 139,
99+
"type": "insert",
100+
"tag": "empty-uart",
101+
"code": [
102+
"#if defined(SIMULINK_APP_ENABLED) && defined(DISABLE_TELEM1_CONSOLE)",
103+
" static Empty::UARTDriver serialEmptyDriver;",
104+
"#endif"
105+
]
106+
},
107+
97108
{
98109
"line": 160,
99110
"type": "replace",
100111
"tag": "simulink-disable-console",
101112
"code": [
102113
"#if defined(SIMULINK_APP_ENABLED) && defined(DISABLE_MAVLINK_USB)",
114+
" #ifndef DISABLE_TELEM1_CONSOLE",
103115
" &serial1Driver,",
116+
" #else",
117+
" &serialEmptyDriver,",
118+
" #endif",
104119
"#else",
105120
" &serial0Driver,",
106121
"#endif"

plane_modification.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,28 @@
9494
"path": "libraries/AP_HAL_ChibiOS/HAL_ChibiOS_Class.cpp",
9595
"comment_style": "//",
9696
"insertions": [
97+
{
98+
"line": 139,
99+
"type": "insert",
100+
"tag": "empty-uart",
101+
"code": [
102+
"#if defined(SIMULINK_APP_ENABLED) && defined(DISABLE_TELEM1_CONSOLE)",
103+
" static Empty::UARTDriver serialEmptyDriver;",
104+
"#endif"
105+
]
106+
},
107+
97108
{
98109
"line": 160,
99110
"type": "replace",
100111
"tag": "simulink-disable-console",
101112
"code": [
102113
"#if defined(SIMULINK_APP_ENABLED) && defined(DISABLE_MAVLINK_USB)",
114+
" #ifndef DISABLE_TELEM1_CONSOLE",
103115
" &serial1Driver,",
116+
" #else",
117+
" &serialEmptyDriver,",
118+
" #endif",
104119
"#else",
105120
" &serial0Driver,",
106121
"#endif"

0 commit comments

Comments
 (0)