Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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: 0 additions & 3 deletions public/mcm-81339-v0-28-0.bin

This file was deleted.

3 changes: 3 additions & 0 deletions public/mcm-81339-v0-29-0.bin
Git LFS file not shown
3 changes: 0 additions & 3 deletions public/mcm-81349-v0-28-0.bin

This file was deleted.

3 changes: 3 additions & 0 deletions public/mcm-81349-v0-29-0.bin
Git LFS file not shown
24 changes: 18 additions & 6 deletions src/views/pwm/PwmController.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const mcm = new McmPwm(transport);

const errorMsg = ref('');
const isErrorMsg = ref(false);
let errorCount = 0;

const pwmFrequency = ref(1000);
const pwmDutyCycle = ref(0);
Expand All @@ -34,6 +35,7 @@ onMounted(async () => {
} catch (error) {
isErrorMsg.value = true;
errorMsg.value = error.message;
errorCount = 10;
}
});

Expand All @@ -51,6 +53,7 @@ async function updateDutyCycle () {
} catch (error) {
isErrorMsg.value = true;
errorMsg.value = error.message;
errorCount = 10;
}
}

Expand All @@ -60,6 +63,7 @@ async function updateFrequency () {
} catch (error) {
isErrorMsg.value = true;
errorMsg.value = error.message;
errorCount = 10;
}
}

Expand All @@ -82,6 +86,14 @@ async function updateStatus () {
} catch {
/* silent polling error (optional) */
}

if (errorCount > 0) {
errorCount -= 1;
if (errorCount === 0) {
isErrorMsg.value = false;
errorMsg.value = '';
}
}
}
</script>

Expand Down Expand Up @@ -163,12 +175,6 @@ async function updateStatus () {
Live Status
</h5>

<StatusMessage
:is-error="isErrorMsg"
:message="errorMsg"
class="mb-3"
/>

<div class="status-grid">
<div class="status-label">
PWM Frequency
Expand All @@ -191,6 +197,12 @@ async function updateStatus () {
{{ pwmStatFgFrequency ?? '--' }} Hz
</div>
</div>

<StatusMessage
:is-error="isErrorMsg"
:message="errorMsg"
class="mb-3"
/>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/views/system/SystemUpgrade.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ const firmwareBaseNames = {
'Melexis Compact Master LIN': 'mcm-lin',
};
const firmwareLatestRev = {
'mcm-81339': 'v0.28.0',
'mcm-81349': 'v0.28.0',
'mcm-81339': 'v0.29.0',
'mcm-81349': 'v0.29.0',
'mcm-lin': 'v0.4.0',
};
let firmwareBaseName = '';
Expand Down
Loading