Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add warning message to softserial ports #1758

Merged
merged 1 commit into from
Apr 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions _locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -4672,5 +4672,8 @@
},
"nmeaWarning": {
"message": "NMEA protocol is deprecated and might be removed in the future. Please use UBLOX or UBLOX7 protocol instead."
},
"softSerialWarning": {
"message": "It is not advisable to use softserial for flight critical devices like GPS or receiver, or high traffic devices like MSP DisplayPort."
}
}
2 changes: 1 addition & 1 deletion tabs/ports.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<tbody>
<tr class="portConfiguration">
<td class="identifierCell">
<p class="identifier"></p>
<p><div class="identifier"/> <div class="softSerialWarning"><img src="../images/icons/cf_icon_armed_active.svg" height="16" width="16" data-i18n_title="softSerialWarning"/></div></p>
</td>
<td class="functionsCell-data"><select class="msp_baudrate">
<!-- list generated here -->
Expand Down
5 changes: 5 additions & 0 deletions tabs/ports.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,11 @@ TABS.ports.initialize = function (callback) {
port_configuration_e.find('select.peripherals_baudrate').val(serialPort.peripherals_baudrate);

port_configuration_e.find('.identifier').text(portIdentifierToNameMapping[serialPort.identifier]);
if (serialPort.identifier >= 30) {
port_configuration_e.find('.softSerialWarning').css("display", "inline")
} else {
port_configuration_e.find('.softSerialWarning').css("display", "none")
}

port_configuration_e.data('index', portIndex);
port_configuration_e.data('port', serialPort);
Expand Down