Skip to content

Commit

Permalink
feat(memfault): show info if running dt2c firmware
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyheart committed Apr 8, 2024
1 parent cf7e922 commit efdc597
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions src/memfault/Reboots.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { ShowWhenHot } from '../ShowWhenHot.js'
import type { Device } from '../context/Devices.js'
import { Memfault } from '../icons/Memfault.js'
import { useMemfault, type Reboot } from './Context.js'
import { BombIcon } from 'lucide-preact'

const Hot = styled.span`
color: var(--color-nordic-pink);
Expand All @@ -18,6 +19,8 @@ export const Reboots = ({ device }: { device: Device }) => {
const numReboots = deviceReboots.length
const lastReboot = deviceReboots[0] as Reboot

const hasDtcFeature = device.state?.dev?.v.appV.includes('dt2c') ?? false

return (
<>
<dt class={'flex align-items-start'}>
Expand All @@ -42,6 +45,22 @@ export const Reboots = ({ device }: { device: Device }) => {
)}
</ShowWhenHot>
</dd>
{hasDtcFeature && (
<>
<dt>
<BombIcon style={{ color: '#39c0ce' }} />
</dt>
<dd>
<abbr
title={`Device is running a firmware with 'double-tap to crash' enabled.`}
>
<small style={{ color: '#39c0ce' }}>
Tap button 1x, then 2x to crash
</small>
</abbr>
</dd>
</>
)}
</>
)
}
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ if (sentryDSN === undefined) {
console.debug(chalk.yellow(`Sentry DSN`), chalk.blue(sentryDSN))
}
// See https://github.com/NordicPlayground/thingy-world-firmware-aws/releases
const firmwareRelease = process.env.FIRMWARE_RELEASE ?? '2.0.1'
const firmwareRelease = process.env.FIRMWARE_RELEASE ?? '2.1.0'
// See https://www.nordicsemi.com/Products/Development-hardware/nRF9160-DK/Download
const modemFirmwareRelease9160 =
process.env.MODEM_FIRMWARE_RELEASE_9160 ?? '1.3.6'
Expand Down

0 comments on commit efdc597

Please sign in to comment.