Skip to content

Commit

Permalink
Merge pull request #1758 from iNavFlight/mmosca-softserialwarning
Browse files Browse the repository at this point in the history
Add warning message to softserial ports
  • Loading branch information
mmosca authored Apr 16, 2023
2 parents 07eee3c + 057e7f1 commit c1f8494
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
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

0 comments on commit c1f8494

Please sign in to comment.