mirror of
https://github.com/meshtastic/meshtastic.git
synced 2024-12-27 14:39:54 -08:00
format src
This commit is contained in:
parent
06e094c8f5
commit
c9e67a8ec9
|
@ -1,8 +1,7 @@
|
|||
// class .markdown needs to be called or it is removed from the build
|
||||
import React from "react";
|
||||
|
||||
const BaseCSS = () => {
|
||||
return <div className="markdown">Shid Fard</div>;
|
||||
return <div className="markdown">Shid Fard</div>;
|
||||
};
|
||||
|
||||
export default BaseCSS;
|
||||
|
|
|
@ -340,11 +340,11 @@ export const FrequencyCalculator = (): JSX.Element => {
|
|||
|
||||
<div className="flex gap-2">
|
||||
<label className="font-semibold">Number of channels:</label>
|
||||
<input type="number" disabled value={numChannels} />
|
||||
<input type="number" disabled={true} value={numChannels} />
|
||||
</div>
|
||||
<div className="flex gap-2">
|
||||
<label className="font-semibold">Channel Frequency:</label>
|
||||
<input type="number" disabled value={channelFrequency} />
|
||||
<input type="number" disabled={true} value={channelFrequency} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import Link from "@docusaurus/Link";
|
||||
import Layout from "@theme/Layout";
|
||||
import React from "react";
|
||||
|
||||
const Credits = (): JSX.Element => {
|
||||
return (
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from "react";
|
||||
|
||||
import { DeviceFirmwareResource } from "../../../utils/apiTypes";
|
||||
|
||||
export interface releaseCardProps {
|
||||
|
@ -49,7 +47,7 @@ export const FirmwareCard = ({
|
|||
) : (
|
||||
<button
|
||||
type="button"
|
||||
disabled
|
||||
disabled={true}
|
||||
className="button button--secondary button--block"
|
||||
>
|
||||
Loading...
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import React from "react";
|
||||
|
||||
import { FaAndroid, FaApple } from "react-icons/fa";
|
||||
import useSWR from "swr";
|
||||
import useSwr from "swr";
|
||||
|
||||
import {
|
||||
ArrowTopRightOnSquareIcon,
|
||||
|
@ -20,7 +18,7 @@ import {
|
|||
} from "./_components/FirmwareCard";
|
||||
|
||||
const Firmware = (): JSX.Element => {
|
||||
const { data, error } = useSWR<FirmwareReleases>(
|
||||
const { data, error } = useSwr<FirmwareReleases>(
|
||||
"https://api.meshtastic.org/github/firmware/list",
|
||||
fetcher,
|
||||
);
|
||||
|
@ -64,7 +62,8 @@ const Firmware = (): JSX.Element => {
|
|||
</div>
|
||||
<div className="card__body">
|
||||
<p>
|
||||
Devices such as T-Echo, RAK4631, and RAK11300 are flashed via filesystem.
|
||||
Devices such as T-Echo, RAK4631, and RAK11300 are flashed via
|
||||
filesystem.
|
||||
</p>
|
||||
</div>
|
||||
<div className="card__footer mt-auto">
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from "react";
|
||||
|
||||
import Head from "@docusaurus/Head";
|
||||
import Link from "@docusaurus/Link";
|
||||
import useBaseUrl from "@docusaurus/useBaseUrl";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useEffect, useState } from "react";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
import { fromByteArray, toByteArray } from "base64-js";
|
||||
|
||||
|
|
|
@ -1,35 +1,37 @@
|
|||
import React from 'react';
|
||||
import clsx from 'clsx';
|
||||
import Translate from '@docusaurus/Translate';
|
||||
import Heading from '@theme/Heading';
|
||||
export default function NotFoundContent({className}) {
|
||||
import Translate from "@docusaurus/Translate";
|
||||
import Heading from "@theme/Heading";
|
||||
import clsx from "clsx";
|
||||
export default function NotFoundContent({ className }) {
|
||||
return (
|
||||
<main className={clsx('container margin-vert--xl', className)}>
|
||||
<main className={clsx("container margin-vert--xl", className)}>
|
||||
<div className="row">
|
||||
<div className="col col--6 col--offset-3">
|
||||
<Heading as="h1" className="hero__title">
|
||||
<Translate
|
||||
id="theme.NotFound.title"
|
||||
description="The title of the 404 page">
|
||||
description="The title of the 404 page"
|
||||
>
|
||||
Page Not Found
|
||||
</Translate>
|
||||
</Heading>
|
||||
<p>
|
||||
<Translate
|
||||
id="theme.NotFound.p1"
|
||||
description="The first paragraph of the 404 page">
|
||||
description="The first paragraph of the 404 page"
|
||||
>
|
||||
We could not find what you were looking for.
|
||||
</Translate>
|
||||
</p>
|
||||
<p>
|
||||
<Translate
|
||||
id="theme.NotFound.p2"
|
||||
description="The 2nd paragraph of the 404 page">
|
||||
description="The 2nd paragraph of the 404 page"
|
||||
>
|
||||
Please contact the owner of the site that linked you to the
|
||||
original URL and let them know their link is broken.
|
||||
</Translate>
|
||||
</p>
|
||||
<img src="/design/chirpy.png" alt='Chirpy' />
|
||||
<img src="/design/chirpy.png" alt="Chirpy" />
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
import React from 'react';
|
||||
import {translate} from '@docusaurus/Translate';
|
||||
import {PageMetadata} from '@docusaurus/theme-common';
|
||||
import Layout from '@theme/Layout';
|
||||
import NotFoundContent from '@theme/NotFound/Content';
|
||||
import { translate } from "@docusaurus/Translate";
|
||||
import { PageMetadata } from "@docusaurus/theme-common";
|
||||
import Layout from "@theme/Layout";
|
||||
import NotFoundContent from "@theme/NotFound/Content";
|
||||
export default function Index() {
|
||||
const title = translate({
|
||||
id: 'theme.NotFound.title',
|
||||
message: 'Page Not Found',
|
||||
id: "theme.NotFound.title",
|
||||
message: "Page Not Found",
|
||||
});
|
||||
return (
|
||||
<>
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
export default function calculateADC() {
|
||||
//const variables
|
||||
const BAT_MILLIVOLTS_FULL = 4.2;
|
||||
const BAT_MILLIVOLTS_EMPTY = 3.27;
|
||||
const BAT_FULL_PERCENT = 1;
|
||||
//variable
|
||||
const batteryChargePercent =
|
||||
parseFloat(
|
||||
(<HTMLInputElement>document.getElementById("batteryChargePercent")).value,
|
||||
) / 100;
|
||||
const operativeAdcMultiplier = parseFloat(
|
||||
(<HTMLInputElement>document.getElementById("operativeAdcMultiplier")).value,
|
||||
);
|
||||
const result =
|
||||
(operativeAdcMultiplier *
|
||||
((BAT_FULL_PERCENT - 1) * BAT_MILLIVOLTS_EMPTY -
|
||||
BAT_FULL_PERCENT * BAT_MILLIVOLTS_FULL)) /
|
||||
((batteryChargePercent - 1) * BAT_MILLIVOLTS_EMPTY -
|
||||
batteryChargePercent * BAT_MILLIVOLTS_FULL);
|
||||
(<HTMLInputElement>(
|
||||
document.getElementById("newOperativeAdcMultiplier")
|
||||
)).value = result.toFixed(4);
|
||||
//const variables
|
||||
const batMillivoltsFull = 4.2;
|
||||
const batMillivoltsEmpty = 3.27;
|
||||
const batFullPercent = 1;
|
||||
//variable
|
||||
const batteryChargePercent =
|
||||
parseFloat(
|
||||
(<HTMLInputElement>document.getElementById("batteryChargePercent")).value,
|
||||
) / 100;
|
||||
const operativeAdcMultiplier = parseFloat(
|
||||
(<HTMLInputElement>document.getElementById("operativeAdcMultiplier")).value,
|
||||
);
|
||||
const result =
|
||||
(operativeAdcMultiplier *
|
||||
((batFullPercent - 1) * batMillivoltsEmpty -
|
||||
batFullPercent * batMillivoltsFull)) /
|
||||
((batteryChargePercent - 1) * batMillivoltsEmpty -
|
||||
batteryChargePercent * batMillivoltsFull);
|
||||
(<HTMLInputElement>(
|
||||
document.getElementById("newOperativeAdcMultiplier")
|
||||
)).value = result.toFixed(4);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue