Update docs structure

This commit is contained in:
Sacha Weatherstone 2022-04-09 00:29:34 +10:00
parent b9502322a2
commit 64a4791720
39 changed files with 103 additions and 423 deletions

View file

@ -1,7 +1,8 @@
:::important :::important
<span> <span>
The name of ths option changed between Meshtastic 1.2 and 1.3. This The name of ths option changed between Meshtastic 1.2 and 1.3. This
documentaton already reflects the 1.3 syntax. Please substitute '{props.name}' documentaton already reflects the 1.3 syntax. Please substitute '{props.name}'
prefix with '{props.rename}' to get the 1.2 compatible command name. prefix with '{props.rename}' to get the 1.2 compatible command name.
</span> </span>
::: :::

View file

@ -1,5 +0,0 @@
---
id: expectations
title: Expectations
sidebar_label: Expectations
---

View file

@ -1,7 +1,6 @@
--- ---
id: overview
title: About Meshtastic title: About Meshtastic
sidebar_label: About Meshtastic sidebar_label: About
slug: /about slug: /about
--- ---

View file

@ -1,15 +0,0 @@
---
id: academy
title: Meshtastic Academy
sidebar_label: Welcome
slug: /academy
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
I want something that just works.
Tinkerer
Maker

View file

@ -29,34 +29,33 @@ Meshtastic uses the [PlatformIO](https://platformio.org) development environment
## Adding your own Hardware ## Adding your own Hardware
The build system is modular. Adding a new board variant for an already supported architecture is straigtforward. The build system is modular. Adding a new board variant for an already supported architecture is straigtforward.
### Building for your own DIY hardware or mod that you don't want to distribute ### Building for your own DIY hardware or mod that you don't want to distribute
1. go to the `variants` folder in the Meshtastic-device sourcecode and make a new directory for your hardware, let's call it `m5stack_core` and copy an existing configuration you wanna modify 1. go to the `variants` folder in the Meshtastic-device sourcecode and make a new directory for your hardware, let's call it `m5stack_core` and copy an existing configuration you wanna modify
```shell ```shell
cd variants; mkdir m5stack_core cd variants; mkdir m5stack_core
cp ../heltec_v1/* m5stack_core cp ../heltec_v1/* m5stack_core
cd m5stack_core cd m5stack_core
``` ```
2. modify the `platformio.ini` *in this subdirectory* from the canonical define of the hardware variant (`HELTEC_V1` in this case) to `PRIVATE_HW` and make the `-I` on the `build_flags` point to the newly created dir. 2. modify the `platformio.ini` _in this subdirectory_ from the canonical define of the hardware variant (`HELTEC_V1` in this case) to `PRIVATE_HW` and make the `-I` on the `build_flags` point to the newly created dir.
```shell ```shell
[env:m5stack-core] [env:m5stack-core]
extends = esp32_base extends = esp32_base
board = m5stack-core-esp32 board = m5stack-core-esp32
monitor_filters = esp32_exception_decoder monitor_filters = esp32_exception_decoder
build_flags = build_flags =
${esp32_base.build_flags} -D PRIVATE_HW -I variants/m5stack_core ${esp32_base.build_flags} -D PRIVATE_HW -I variants/m5stack_core
lib_deps = lib_deps =
${esp32_base.lib_deps} ${esp32_base.lib_deps}
``` ```
3. edit the `variant.h` file *in this subdirectory* to reflect the defines and configurations for your board. The example is very well commented. 3. edit the `variant.h` file _in this subdirectory_ to reflect the defines and configurations for your board. The example is very well commented.
4. build, run and debug until you are satisfied with the result.
3. build, run and debug until you are satisfied with the result.
### Adding a new off-the-shelf or DIY hardware that you want to distribute (e.g. add a new canon board) ### Adding a new off-the-shelf or DIY hardware that you want to distribute (e.g. add a new canon board)

View file

@ -1,8 +1,7 @@
--- ---
id: overview id: contributing
title: Contribute to Meshtastic title: Contributing
sidebar_label: Contribute to Meshtastic slug: /developers/contributing
slug: /developers
--- ---
# How to Help # How to Help

View file

@ -47,3 +47,37 @@ import { Dark, Light } from '/src/components/ColorMode';
/> />
</div> </div>
</Light> </Light>
### Code Blocks
#### Usage:
Always specify the language used directly after the start of the code block (```).
:::note
For command line examples, please use `shell` and not any of the other aliases.
:::
for further information please see the relevant [Docusaurus page](https://docusaurus.io/docs/markdown-features/code-blocks)
````
```ts title="Demo"
export const typedArrayToBuffer = (array: Uint8Array): ArrayBuffer => {
return array.buffer.slice(
array.byteOffset,
array.byteLength + array.byteOffset
);
};
```
````
#### Demo:
```ts title="Demo"
export const typedArrayToBuffer = (array: Uint8Array): ArrayBuffer => {
return array.buffer.slice(
array.byteOffset,
array.byteLength + array.byteOffset,
);
};
```

View file

@ -1,7 +1,6 @@
--- ---
id: faq id: faq
title: FAQs - General title: FAQs
sidebar_label: General
slug: /faq slug: /faq
--- ---

View file

@ -1,5 +1,4 @@
--- ---
id: overview
title: Hardware title: Hardware
sidebar_label: Hardware sidebar_label: Hardware
slug: /hardware slug: /hardware

View file

@ -1,5 +1,4 @@
--- ---
id: overview
title: Legal title: Legal
sidebar_label: Legal sidebar_label: Legal
slug: /legal slug: /legal

View file

@ -1,5 +1,4 @@
--- ---
id: overview
title: Device Settings title: Device Settings
sidebar_label: Device Settings sidebar_label: Device Settings
slug: /settings slug: /settings

View file

@ -109,14 +109,14 @@ You can test changing channels with the QR code shown below.
Various data-rates are selectable when configuring a channel and are inversely proportional to the theoretical range of the devices: Various data-rates are selectable when configuring a channel and are inversely proportional to the theoretical range of the devices:
| Channel setting | Data-rate | | Channel setting | Data-rate |
| ------------------- | -------------------- | | ------------------- | ------------ |
| Short Range / Fast | 19346.94 bps | | Short Range / Fast | 19346.94 bps |
| Short Range / Slow | 4800.00 bps | | Short Range / Slow | 4800.00 bps |
| Medium Range / Fast | 1227.18 bps | | Medium Range / Fast | 1227.18 bps |
| Medium Range / Slow | 763.29 bps | | Medium Range / Slow | 763.29 bps |
| Long Range / Fast | 196.74 bps | | Long Range / Fast | 196.74 bps |
| Long Range / Slow | 136.71 bps | | Long Range / Slow | 136.71 bps |
### Send a message ### Send a message

View file

@ -1,5 +1,4 @@
--- ---
id: overview
title: Software title: Software
sidebar_label: Software sidebar_label: Software
slug: /software slug: /software

View file

@ -55,7 +55,7 @@ From lower to higher power consumption.
- At cold boot: The initial state (after setup() has run) is DARK - At cold boot: The initial state (after setup() has run) is DARK
- While in DARK: if we receive EVENT_BOOT, transition to ON (and show the bootscreen). This event will be sent if we detect we woke due to reset (as opposed to deep sleep) - While in DARK: if we receive EVENT_BOOT, transition to ON (and show the bootscreen). This event will be sent if we detect we woke due to reset (as opposed to deep sleep)
- While in LS: Once every position_broadcast_secs (default 15 mins) - the unit will wake into DARK mode and broadcast a "networkPing" (our position) and stay alive for wait_bluetooth_secs (default 60 seconds). This allows other nodes to have a record of our last known position if we go away and allows a paired phone to hear from us and download messages. - While in LS: Once every position_broadcast_secs (default 15 mins) - the unit will wake into DARK mode and broadcast a "networkPing" (our position) and stay alive for wait_bluetooth_secs (default 60 seconds). This allows other nodes to have a record of our last known position if we go away and allows a paired phone to hear from us and download messages.
- While in LS: Every one hour, when we wake to send our position we \_also* broadcast our owner. This lets new nodes on the network find out about us or correct duplicate node number assignments. - While in LS: Every one hour, when we wake to send our position we \_also\* broadcast our owner. This lets new nodes on the network find out about us or correct duplicate node number assignments.
- While in LS/NB/DARK: If the user presses a button (EVENT_PRESS) we go to full ON mode for screen_on_secs (default 30 seconds). Multiple presses keeps resetting this timeout - While in LS/NB/DARK: If the user presses a button (EVENT_PRESS) we go to full ON mode for screen_on_secs (default 30 seconds). Multiple presses keeps resetting this timeout
- While in LS/NB/DARK: If we receive new text messages (EVENT_RECEIVED_TEXT_MSG), we go to full ON mode for screen_on_secs (same as if user pressed a button) - While in LS/NB/DARK: If we receive new text messages (EVENT_RECEIVED_TEXT_MSG), we go to full ON mode for screen_on_secs (same as if user pressed a button)
- While in LS: while we receive packets on the radio (EVENT_RECEIVED_PACKET) we will wake and handle them and stay awake in NB mode for min_wake_secs (default 10 seconds) - While in LS: while we receive packets on the radio (EVENT_RECEIVED_PACKET) we will wake and handle them and stay awake in NB mode for min_wake_secs (default 10 seconds)

View file

@ -56,6 +56,7 @@ const config = {
colorMode: { colorMode: {
respectPrefersColorScheme: true, respectPrefersColorScheme: true,
}, },
autoCollapseSidebarCategories: true,
navbar: { navbar: {
title: 'Meshtastic', title: 'Meshtastic',
hideOnScroll: true, hideOnScroll: true,
@ -66,90 +67,50 @@ const config = {
}, },
items: [ items: [
/*
{ {
label: "Start Here", label: 'Docs',
to: "docs/academy",
activeBasePath: "docs/academy",
},
*/
{
label: 'About Meshtastic',
to: 'docs/about',
activeBasePath: 'docs/about',
},
/*
{
label: "Showcase",
to: "showcase",
activeBasePath: "showcase",
},
*/
{
label: 'Documentation',
items: [ items: [
{ {
label: 'Getting Started', label: 'Getting Started',
to: 'docs/getting-started', to: 'docs/getting-started',
}, },
// FIXME create configuration & settings landing page and adjust path below
{ {
label: 'Configuration & Settings', label: 'Configuration',
to: 'docs/settings', to: 'docs/settings',
}, },
{ {
label: 'Hardware Details', label: 'Hardware',
to: 'docs/hardware', to: 'docs/hardware',
}, },
/*
{ {
label: "Mesh Radio Details", label: 'Software',
to: "docs/mesh"
},
*/
{
label: 'Meshtastic Software',
to: 'docs/software', to: 'docs/software',
}, },
], ],
}, },
{ {
label: 'Contribute', label: 'Developers',
to: 'docs/developers',
},
{
label: 'Other',
items: [ items: [
{ {
label: 'Developers', label: 'Downloads',
to: 'docs/developers', to: 'downloads',
activeBasePath: 'downloads',
}, },
{ {
label: 'Maintaining Documentation', label: 'Showcase',
to: 'docs/developers/maintaining-documentation/overview', to: 'showcase',
}, activeBasePath: 'showcase',
{
label: 'Legal',
to: 'docs/legal',
}, },
], ],
}, },
{
label: 'Downloads',
to: 'downloads',
activeBasePath: 'downloads',
},
{
href: 'https://meshtastic.discourse.group',
label: 'Forum',
position: 'left',
},
{
href: 'https://github.com/meshtastic/meshtastic',
position: 'right',
className: 'header-github-link',
'aria-label': 'GitHub repository',
},
], ],
}, },
footer: { footer: {
copyright: `<a href="https://vercel.com/?utm_source=meshtastic&utm_campaign=oss" style="color: var(--ifm-footer-color)">Powered by ▲ Vercel</a> | Meshtastic® is a registered trademark of Geeksville Industries LLC`, copyright: `<a href="https://vercel.com/?utm_source=meshtastic&utm_campaign=oss">Powered by ▲ Vercel</a> | Meshtastic® is a registered trademark of Geeksville Industries LLC. | <a href="/docs/legal">Legal Information</a>.`,
}, },
algolia: { algolia: {
appId: 'IG2GQB8L3V', appId: 'IG2GQB8L3V',
@ -180,6 +141,8 @@ const config = {
docs: { docs: {
sidebarPath: require.resolve('./sidebars.js'), sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/meshtastic/meshtastic/edit/master/', editUrl: 'https://github.com/meshtastic/meshtastic/edit/master/',
breadcrumbs: false,
showLastUpdateAuthor: true,
}, },
theme: { theme: {
customCss: require.resolve('./src/css/custom.css'), customCss: require.resolve('./src/css/custom.css'),

View file

@ -1,319 +1,29 @@
module.exports = { // @ts-check
About: {
'About Meshtastic': [
'about/overview',
{
Concepts: [
'about/concepts/overview',
'about/concepts/channels',
'about/concepts/clients',
'about/concepts/external-devices',
'about/concepts/internet',
'about/concepts/mesh',
],
},
'about/expectations',
{
FAQs: [
'faq/faq',
'faq/antenna',
'faq/bluetooth',
'faq/channel',
{
Clients: [
'faq/client-android',
'faq/client-python-cli',
'faq/client-ios',
'faq/client-web',
],
},
{
Devices: [
'faq/device',
'faq/device-tbeam',
'faq/device-wisblock',
]
},
{
'Flashing Firmware': ['faq/m-flasher'],
},
'faq/mesh',
'faq/mqtt',
'faq/modules',
'faq/wifi',
],
},
],
},
Software: {
Software: [
'software/overview',
{
'Meshtastic device': [
'software/device/device-firmware',
'software/device/device-channels',
'software/device/device-remote-admin',
'software/device/remote-hardware-service',
'software/device/device-power',
'software/device/critical-error-codes',
'software/device/ham',
],
},
{
'Meshtastic Android': [
'software/android/android-installation',
'software/android/android-usage',
],
},
{
'Meshtastic Apple': [
'software/apple/ios-development',
'software/apple/ios',
'software/apple/ipados',
'software/apple/macos',
],
},
{
'Meshtastic.js': [
'software/js/getting-started',
'software/js/connecting',
'software/js/events',
'software/js/http-api',
{
type: 'link',
label: 'API Docs',
href: 'https://js.meshtastic.org',
},
],
},
{
'Meshtastic-python': [
'software/python/python-installation',
'software/python/python-standalone',
'software/python/python-cli',
'software/python/python-uses',
'software/python/python-stream',
{
type: 'link',
label: 'API Docs',
href: 'https://python.meshtastic.org/',
},
],
},
{
Modules: [
'software/modules/modules',
'software/modules/range-test-module',
'software/modules/ext-notif-module',
'software/modules/canned-message-module',
'software/modules/serial-module',
'software/modules/store-forward-module',
'software/modules/telemetry-module',
],
},
{
'Web interface': [
'software/web/web-app-software',
'software/web/web-partitions-software',
'software/web/web-development-software',
],
},
{
'Community projects': [
'software/community/community-overview',
'software/community/community-atak',
'software/community/community-pygui',
'software/community/community-go',
],
},
{
Other: [
'software/other/sw-design',
'software/other/remote-hardware-service',
'software/other/rak815',
'software/other/power',
'software/other/pinetab',
'software/other/nrf52-TODO',
'software/other/mqtt',
'software/other/install-OSX',
'software/other/esp32-arduino-build',
'software/other/ant',
'software/other/docker',
],
},
],
'Additional Documentation': [
{ type: 'ref', id: 'getting-started/overview' },
{ type: 'ref', id: 'settings/overview' },
{ type: 'ref', id: 'hardware/overview' },
{ type: 'ref', id: 'developers/overview' },
{ type: 'ref', id: 'developers/maintaining-documentation/overview' },
{ type: 'ref', id: 'legal/overview' },
],
},
Configuration: {
'Getting Started': [
'getting-started/overview',
{
'Flashing firmware': [
'getting-started/flashing-firmware',
'getting-started/meshtastic-flasher',
{
'Manual Method': [
'getting-started/flashing-esp32',
'getting-started/flashing-nrf52',
],
},
],
},
{
'Connect to Device': ['getting-started/clients'],
},
'getting-started/first-steps',
],
'Device Settings': [ /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
'settings/overview', module.exports = {
'settings/channel', Sidebar: [
'settings/gps', {
'settings/ham', type: 'autogenerated',
'settings/mqtt', dirName: '.',
'settings/power', },
'settings/router', ],
'settings/wifi', developers: [
{ {
Modules: [ type: 'category',
'settings/canned-message-module', label: 'Developers',
'settings/input-broker-module', link: {
'settings/external-notification-module', type: 'generated-index',
'settings/range-test-module', title: 'Developer Documentation',
'settings/serial-module', description: 'Meshtastic developer resources',
'settings/store-and-forward-module', slug: '/developers',
'settings/telemetry-module',
],
Advanced: ['settings/channel-advanced', 'settings/misc'],
}, },
], items: [
'Additional Documentation': [ {
{ type: 'ref', id: 'hardware/overview' }, type: 'autogenerated',
{ type: 'ref', id: 'software/overview' }, dirName: 'developers',
{ type: 'ref', id: 'developers/overview' }, },
{ type: 'ref', id: 'developers/maintaining-documentation/overview' }, ],
{ type: 'ref', id: 'legal/overview' }, },
], ],
},
Hardware: {
Hardware: [
'hardware/overview',
{
type: 'link',
label: 'Hardware List',
href: '/hardware',
},
{
'Supported Hardware': [
'hardware/supported/tbeam',
'hardware/supported/lora',
'hardware/supported/heltec',
'hardware/supported/techo',
'hardware/supported/wisBlock',
'hardware/supported/linux',
],
},
'hardware/buttons',
'hardware/battery',
'hardware/gpsmodule',
{
Antennas: [
'hardware/antenna/antenna',
'hardware/antenna/aerials',
'hardware/antenna/non-aerial',
'hardware/antenna/antenna-testing',
'hardware/antenna/resources',
],
},
],
'Additional Documentation': [
{ type: 'ref', id: 'getting-started/overview' },
{ type: 'ref', id: 'settings/overview' },
{ type: 'ref', id: 'software/overview' },
{ type: 'ref', id: 'developers/overview' },
{ type: 'ref', id: 'developers/maintaining-documentation/overview' },
{ type: 'ref', id: 'legal/overview' },
],
},
Contribute: {
Developers: [
'developers/overview',
{
Protobufs: ['developers/protobufs/api'],
},
'developers/api',
'developers/publish',
{
Firmware: [
'developers/firmware/build',
'developers/firmware/stacktrace-decode',
'developers/firmware/device-api',
'developers/firmware/radio-settings',
'developers/firmware/mesh-alg',
'developers/firmware/encryption',
'developers/firmware/portnum',
'developers/firmware/module-api',
'developers/firmware/http-api',
'developers/firmware/documents',
],
},
{
'Android App': [
'developers/android/build-app',
'developers/android/mapbox',
],
'Maintaining Documentation': [
'developers/maintaining-documentation/overview',
{
Dependencies: [
'developers/maintaining-documentation/docusaurus',
'developers/maintaining-documentation/github',
'developers/maintaining-documentation/vercel',
],
},
{
Examples: [
'developers/maintaining-documentation/serve-docs-locally',
],
},
{
'Style Guides': [
'developers/maintaining-documentation/style-guides/markdown-features',
'developers/maintaining-documentation/style-guides/style-guide-settings',
],
},
],
},
],
'Additional Documentation': [
{ type: 'ref', id: 'getting-started/overview' },
{ type: 'ref', id: 'settings/overview' },
{ type: 'ref', id: 'hardware/overview' },
{ type: 'ref', id: 'software/overview' },
{ type: 'ref', id: 'legal/overview' },
{ type: 'ref', id: 'developers/overview' },
],
},
Legal: {
Legal: [
'legal/overview',
'legal/licensing',
'legal/trademark',
'legal/privacy',
],
'Additional Documentation': [
{ type: 'ref', id: 'getting-started/overview' },
{ type: 'ref', id: 'settings/overview' },
{ type: 'ref', id: 'hardware/overview' },
{ type: 'ref', id: 'software/overview' },
{ type: 'ref', id: 'developers/overview' },
],
},
}; };