Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge production branch #2

Merged
merged 9 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}
47 changes: 0 additions & 47 deletions docs/intro.md

This file was deleted.

68 changes: 68 additions & 0 deletions docs/leo-rover/01-documentation/01-getting-started.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
title: Getting started
sidebar_label: Getting started
---

# Getting started

## Before you power on the Rover

### How to connect the battery to the Rover?

Connect the mating pair of the 3-pin connectors: the battery and the converter located on the opposite side of the Rover. Then, fit the battery cables inside the Rover's back-rib and slide the battery on back-left quarter of the Rover's body. Tighten the 3x M5 screws using the provided screwdriver.

![leo-rover-allen](/img/leo-battery-allen.jpg)

## Operation & maintenance

### How to connect to the Rover?

To connect to the Rover, turn Leo on using its main power button located on the left side of the battery. The LED on the button should start blinking green. After ca. 30 s, the LED should stop blinking and the Rover should be operational.

Check your host device for the WiFi network. The default credentials should look like this:

SSID: `LeoRover-XXXX`

Password: `password`

:::note
Instead of the `XXXX` keyword, you should see an identifier unique to your Rover's computer.
:::

For instructions on how to change WiFi network credentials, you can visit this page:

TODO

Connect to the network.

To access the Web User Interface, open your web browser and type in the address line:

```
http://10.0.0.1/
```

![leo-ui](/img/leo-ui.jpg)

## Turn off the Rover properly

Due to the system architecture, the Rover needs to be turned off the old-school style. Before you click the power button located on the battery, it's better to turn off the computer first.

To do that, click upper right corner icon, wait until the Rover shuts down (WiFi network will disappear) and shut down the battery.

:::info
This way you'll extend the life of the software filesystem.
:::

## Battery charging

First, disconnect the battery from the rover. To do that, untighten 3x inner hex head screws located on the rear left side of the rover. Then, slide the battery off the rover frame and disconnect the 3-pin connector.

Connect the charger provided with the Rover to AC power socket - LED located on the charger will light green.

Connect the battery to the charger and press the battery button. The charger LED will change from green to red - meaning that it's charging now.

When the battery is fully charged, the LED on the battery should turn back green. Turn the battery off and connect it back to the rover.

:::warning
Do not click the button during charging!
:::
3 changes: 3 additions & 0 deletions docs/leo-rover/01-documentation/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"label": "Documentation"
}
33 changes: 19 additions & 14 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import {themes as prismThemes} from 'prism-react-renderer';
import type {Config} from '@docusaurus/types';
import { themes as prismThemes } from 'prism-react-renderer';
import type { Config } from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';

const config: Config = {
title: 'Fictionlab Documentation',
tagline: 'Documentation and Tutorials for Fictionlab robots',
favicon: undefined,
favicon: 'img/favicon.png',

// Set the production url of your site here
url: 'https://fictionlab.github.io',
url: 'https://docs.fictionlab.pl',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/docs/',
baseUrl: '/',

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'fictionlab', // Usually your GitHub org/user name.
projectName: 'fictionlab.github.io', // Usually your repo name.
deploymentBranch: "gh-pages",
deploymentBranch: 'gh-pages',

onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
Expand All @@ -36,8 +36,7 @@ const config: Config = {
{
docs: {
sidebarPath: './sidebars.ts',
editUrl:
'https://github.com/fictionlab/docs/edit/development/',
editUrl: 'https://github.com/fictionlab/docs/edit/development/',
},
theme: {
customCss: './src/css/custom.css',
Expand All @@ -49,16 +48,22 @@ const config: Config = {
themeConfig: {
navbar: {
logo: {
alt: "fictionlab logo",
src: "img/fictionlab_logo_gray.svg",
srcDark: "img/fictionlab_logo_white.svg"
alt: 'fictionlab logo',
src: 'img/fictionlab_logo_gray.svg',
srcDark: 'img/fictionlab_logo_white.svg',
},
items: [
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
type: 'dropdown',
label: 'Robots',
position: 'left',
label: 'Tutorial',
items: [
{
type: 'docSidebar',
sidebarId: 'leoSidebar',
label: 'Leo Rover',
},
],
},
{
href: 'https://github.com/fictionlab/docs',
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"typecheck": "tsc"
"typecheck": "tsc",
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,mdx}\""
},
"dependencies": {
"@docusaurus/core": "3.0.0",
Expand All @@ -27,6 +28,7 @@
"@docusaurus/module-type-aliases": "3.0.0",
"@docusaurus/tsconfig": "3.0.0",
"@docusaurus/types": "3.0.0",
"prettier": "^3.1.0",
"typescript": "~5.2.2"
},
"browserslist": {
Expand Down
4 changes: 2 additions & 2 deletions sidebars.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
import type { SidebarsConfig } from '@docusaurus/plugin-content-docs';

/**
* Creating a sidebar enables you to:
Expand All @@ -12,7 +12,7 @@ import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
*/
const sidebars: SidebarsConfig = {
// By default, Docusaurus generates a sidebar from the docs folder structure
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
leoSidebar: [{ type: 'autogenerated', dirName: 'leo-rover' }],

// But you can create a sidebar manually
/*
Expand Down
28 changes: 14 additions & 14 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@

/* You can override the default Infima variables here. */
:root {
--ifm-color-primary: #2e8555;
--ifm-color-primary-dark: #29784c;
--ifm-color-primary-darker: #277148;
--ifm-color-primary-darkest: #205d3b;
--ifm-color-primary-light: #33925d;
--ifm-color-primary-lighter: #359962;
--ifm-color-primary-lightest: #3cad6e;
--ifm-color-primary: #c57b2c;
--ifm-color-primary-dark: #a76826;
--ifm-color-primary-darker: #8b5720;
--ifm-color-primary-darkest: #794c1c;
--ifm-color-primary-light: #cf812e;
--ifm-color-primary-lighter: #e08e35;
--ifm-color-primary-lightest: #f59b3b;
--ifm-code-font-size: 95%;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
}

/* For readability concerns, you should choose a lighter palette in dark mode. */
[data-theme='dark'] {
--ifm-color-primary: #25c2a0;
--ifm-color-primary-dark: #21af90;
--ifm-color-primary-darker: #1fa588;
--ifm-color-primary-darkest: #1a8870;
--ifm-color-primary-light: #29d5b0;
--ifm-color-primary-lighter: #32d8b4;
--ifm-color-primary-lightest: #4fddbf;
--ifm-color-primary: #f3b068;
--ifm-color-primary-dark: #d69b5b;
--ifm-color-primary-darker: #be8a51;
--ifm-color-primary-darkest: #b17f4a;
--ifm-color-primary-light: #f5b774;
--ifm-color-primary-lighter: #f5bd81;
--ifm-color-primary-lightest: #f7c794;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
}
10 changes: 5 additions & 5 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Heading from '@theme/Heading';
import styles from './index.module.css';

function HomepageHeader() {
const {siteConfig} = useDocusaurusContext();
const { siteConfig } = useDocusaurusContext();
return (
<header className={clsx('hero hero--primary', styles.heroBanner)}>
<div className="container">
Expand All @@ -20,14 +20,14 @@ function HomepageHeader() {
}

export default function Home(): JSX.Element {
const {siteConfig} = useDocusaurusContext();
const { siteConfig } = useDocusaurusContext();
return (
<Layout
title={`Hello from ${siteConfig.title}`}
description="Description will go into a meta tag in <head />">
description="Description will go into a meta tag in <head />"
>
<HomepageHeader />
<main>
</main>
<main></main>
</Layout>
);
}
Empty file removed static/.nojekyll
Empty file.
Binary file added static/img/favicon big.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/leo-battery-allen.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/leo-ui.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
// This file is not used in compilation. It is here just for a nice editor experience.
"extends": "@docusaurus/tsconfig",
"compilerOptions": {
"baseUrl": "."
}
}
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6789,6 +6789,11 @@ postcss@^8.4.17, postcss@^8.4.21, postcss@^8.4.26:
picocolors "^1.0.0"
source-map-js "^1.0.2"

prettier@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.0.tgz#c6d16474a5f764ea1a4a373c593b779697744d5e"
integrity sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==

pretty-error@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-4.0.0.tgz#90a703f46dd7234adb46d0f84823e9d1cb8f10d6"
Expand Down
Loading