feat(mavlink): adopt the kaptan-native dialect
This commit is contained in:
1 parent
1c90870634
commit
5f91465e66
87 files changed
+7733
-6850
No files matched your search
@@ -81,7 +81,7 @@ q('#save').addEventListener('click', () => {
|
||||
function fieldStructure(field) {
|
||||
return [
|
||||
field.id, field.key, field.label, field.group, field.unit, field.kind,
|
||||
field.minimum, field.maximum, field.default, field.help, field.options,
|
||||
field.minimum, field.maximum, field.factory, field.help, field.options,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ function buildEditor(fields) {
|
||||
const bounds = field.minimum !== null || field.maximum !== null
|
||||
? `Inclusive bounds: ${field.minimum ?? 'unbounded'} to ${field.maximum ?? 'unbounded'}.`
|
||||
: '';
|
||||
const helpText = [field.help, `Default: ${field.default}.`, bounds].filter(Boolean).join(' ');
|
||||
const helpText = [field.help, `Factory: ${field.factory}.`, bounds].filter(Boolean).join(' ');
|
||||
if (helpText) {
|
||||
const help = document.createElement('small');
|
||||
help.id = `help-${field.id}`;
|
||||
@@ -402,8 +402,8 @@ function renderLogs(snapshot) {
|
||||
function renderState(state) {
|
||||
latestState = state;
|
||||
setText(q('#connection-status'), state.path ? `${state.status} (${state.path})` : state.status);
|
||||
if (state.error) showError(state.error);
|
||||
q('#configuration').hidden = latestConfig?.schema_id === null || latestConfig === null;
|
||||
showError(state.error ?? '');
|
||||
q('#configuration').hidden = !state.has_config;
|
||||
q('#packet-monitor').hidden = !state.can_disconnect;
|
||||
q('#log-monitor').hidden = !state.can_disconnect;
|
||||
renderPermissions();
|
||||
@@ -420,8 +420,9 @@ async function refresh() {
|
||||
renderPackets(packets);
|
||||
renderLogs(logs);
|
||||
if (state.config_revision !== configRevision) {
|
||||
const config = await api('/api/config');
|
||||
renderConfig(config);
|
||||
configRevision = state.config_revision;
|
||||
renderConfig(await api('/api/config'));
|
||||
q('#configuration').hidden = latestConfig.schema_id === null;
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
Reference in new issue
Block a user