Skip to content

Commit 29e3de2

Browse files
authored
Update main.js
Added reset for the OSD units if the FC is not connected.
1 parent 51a62fc commit 29e3de2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

main.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ $(document).ready(function () {
6565
}
6666
globalSettings.proxyLayer = result.proxylayer;
6767
});
68+
69+
// Resets the OSD units used by the unit coversion when the FC is disconnected.
70+
if (!CONFIGURATOR.connectionValid) {
71+
globalSettings.osdUnits = null;
72+
}
6873

6974
// alternative - window.navigator.appVersion.match(/Chrome\/([0-9.]*)/)[1];
7075
GUI.log('Running - OS: <strong>' + GUI.operating_system + '</strong>, ' +

0 commit comments

Comments
 (0)