Skip to content

Commit

Permalink
logo, readme, video link image merge 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-ffm committed May 15, 2019
1 parent c12a296 commit 7f701c8
Show file tree
Hide file tree
Showing 5 changed files with 173 additions and 43 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
.gcc-flags.json
.DS_Store
src/.DS_Store
platformio.ini
111 changes: 71 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,45 @@

INAV-Radar is an addition to the [INAV](https://github.com/iNavFlight/inav) flight control software, it relays information about UAVs in the area to the flight controller for display on the OSD. INAV-Radar does this by using [LoRa](https://en.wikipedia.org/wiki/LoRa) radio to broadcast position, altitude, speed and plane name. It also listens for other UAVs so INAV OSD can display this information as a HUD.

![OSD](https://github.com/mistyk/inavradar-ESP32/raw/master/docs/osd.jpg)
[![Video](https://github.com/mistyk/inavradar-ESP32/raw/master/docs/video.png)](https://www.youtube.com/watch?v=7ww0YOGN7F0)

## News

Tests on aplha 7 look promising!
ESP32 Firmware Installer: [Download](https://github.com/KingKone/INAV-Radar_Installer/releases)

RCgroups thread: [INAV-Radar on RCgroups](https://www.rcgroups.com/forums/showthread.php?3304673-iNav-Radar-ESP32-LoRa-modems)

*** 1.20 (2019/05/14)

Better timing for MSP and air packets
5 nodes capable, but locked at 4 nodes for now
Faster rate for MSP messages to improve tracking accuracy
in iNav 2.2, faster display to reduce tracking stuttering
Known issue : sometime the debug page with the timings
reboots the module

If you feel brave engough to be a tester, just ask us in the Facebook group. [Contact](#contact)

Thanks to Olivier we now have 'the HUD' it's nealy augmented reality!
*** 1.01 (2019/05/06)

- More detailled screens per nodes
- Displays the local vbat and mAh. These datas are not yet
transmitted to the other nodes.
- Pressing the top button during the boot sequence will put
the module in "silent" mode (ground-station), it will only
receive, and won't transmit, thus freeing a slot. Button
must be pressed at least once, between the time the module
is plugged and the end of the SCAN progress bar.
- No need to update iNav since 1.00, no changes.

*** 1.00 (2019/04/25)

- Initial release
- Require iNav 2.2-dev, including the latest version for the
Hud branch (build date 2019/04/27 or newer)
- Cycle time 500ms, slotspacing 125ms, LoRA SF9 bw250,
maximum 4 nodes (you + 3 others)

If you feel brave engough to be a tester, just ask us in the Facebook group. [Contact](#contact)

## Index
[Hardware](#hardware)
Expand Down Expand Up @@ -50,24 +80,26 @@ Everything here is WORK IN PROGRESS!
The software is based on two components:
- ESP32 LoRa part is found in this repo.
It's developed using [PlatformIO](https://platformio.org/) plugin for [Atom](https://atom.io/) editor.
- INAV OSD part repo is found [here](https://github.com/KingKone/inav).
- INAV OSD part repo is found [here](https://github.com/OlivierC-FR/inav/tree/oc_hud).
It's a fork from the INAV repo and instructions how to build can be found [here](https://github.com/iNavFlight/inav/blob/master/docs/development/Building%20in%20Docker.md).

INAV-Radar is a experimental firmware based on INAV and is currently no part of the INAV flight control software. INAV repo can be found [here](https://github.com/iNavFlight/inav).

## Testing
## ESP32 firmware flashing

With the installer (Only Windows at the moment):

For testing there is no need to install Atom and PlatformIO, just use the [esptool](https://github.com/espressif/esptool) for flashing.
For testing there is no need to install Atom and PlatformIO, just use the [ESP32 firmware installer](https://github.com/KingKone/INAV-Radar_Installer/releases) for flashing.

Your system needs the driver for the USB UART bridge:
Manual method:

Your system may needs the driver for the USB UART bridge:
[Windows+MacOS](https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers)
or [Alternative MacOS](https://github.com/adrianmihalko/ch340g-ch34g-ch34x-mac-os-x-driver)

Also you will need [Python 3.4 or newer](https://www.python.org/downloads/) installed on your system.
You will need [Python 3.4 or newer](https://www.python.org/downloads/) installed on your system.

Be sure to check 'Add Python to PATH':
![Python Setup](https://github.com/mistyk/inavradar-ESP32/raw/master/docs/python.png)


The latest stable esptool.py release can be installed via pip in your command prompt:

Expand All @@ -89,13 +121,13 @@ You may change the --port to match your operating system. If you are using Windo
Windows:
```
c:\> cd (your air-to-air directory here)
c:\> esptool.py --port COM11 write_flash -z --flash_mode dio 0x1000 bootloader_dio_40m.bin 0x8000 default.bin 0xe000 boot_app0.bin 0x10000 firmware.bin 0x291000 fs.bin
c:\> esptool.py --port COM11 write_flash -z --flash_mode dio 0x1000 bootloader_dio_40m.bin 0x8000 default.bin 0xe000 boot_app0.bin 0x10000 firmware.bin
```

MacOS:
```
$ cd (your air-to-air directory here)
$ esptool.py --port /dev/tty.SLAB_USBtoUART write_flash -z --flash_mode dio 0x1000 bootloader_dio_40m.bin 0x8000 default.bin 0xe000 boot_app0.bin 0x10000 firmware.bin 0x291000 fs.bin
$ esptool.py --port /dev/tty.SLAB_USBtoUART write_flash -z --flash_mode dio 0x1000 bootloader_dio_40m.bin 0x8000 default.bin 0xe000 boot_app0.bin 0x10000 firmware.bin
```

Expand All @@ -116,35 +148,40 @@ Backup your FC settings, flash the current [testing version of INAV](https://git

Dump your backup back into the cli.

Activate MSP on the corresponding UART, the speed is 57600.

OSD and HUD settings:
```
osd_layout 0 2 0 0 V // Crosshair and the HUD ON
osd_layout 0 43 0 0 H // north map OFF
osd_layout 0 44 0 0 H // takeoff map OFF
osd_layout 0 45 0 0 H // radar map OFF
set osd_camera_uptilt = 0 // the HUD: camera angle
set osd_camera_fov_h = 135 // the HUD: field of view horizontal
set osd_camera_fov_v = 85 // the HUD: field of view vertical
```
Activate MSP on the corresponding UART, the speed is 115200.
Enable the crosshair.

Please also flash the extra Vision OSD fonts for signal strenth and the homing crosshair.
Please also flash the extra Vision OSD fonts for signal strenth and the homing crosshair. Vision 1 is small/light, Vision 4 is heavy/bold.

The HUD has an entry in the stick menu (OSD->HUD) where you can change this configuration at runtime.

Thanks for testing! 😄 👍
Optional OSD and HUD cli settings:
```
set osd_crosshairs_style = TYPE6
set osd_horizon_offset = 0
set osd_camera_uptilt = 0
set osd_camera_fov_h = 135
set osd_camera_fov_v = 85
set osd_hud_margin_h = 1
set osd_hud_margin_v = 3
set osd_hud_homing = OFF
set osd_hud_homepoint = ON
set osd_hud_radar_disp = 4
set osd_hud_radar_range_min = 1
set osd_hud_radar_range_max = 4000
```

## Commands
## Contact

If something is not working correctly, please open a serial terminal (Windows e.g. [PuTTy](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html)).
[Facebook Group](https://www.facebook.com/groups/360607501179901/)

[INAV-Radar on RCgroups](https://www.rcgroups.com/forums/showthread.php?3304673-iNav-Radar-ESP32-LoRa-modems)

Attention !!! On Windows with Putty you must use [CRTL]-[J] instead of the [ENTER] key.
[Patreon](https://www.patreon.com/inavradar)

Type in "debug" to activate debug mode. Reset the device (lower button) connected to the terminal and send us a copy of the output.
## Commands

Also there are some other commands:
!!! COMMANDS ARE DISABLED IN CURRENT VERSION !!!

```
================= Commands =================
Expand All @@ -153,7 +190,7 @@ help - List all commands
config - List all settings
config loraFreq n - Set frequency in Hz (e.g. n = 433000000)
config loraBandwidth n - Set bandwidth in Hz (e.g. n = 250000)
config loraSpread n - Set SF (e.g. n = 10)
config loraSpread n - Set SF (e.g. n = 7)
config uavtimeout n - Set UAV timeout in sec (e.g. n = 10)
config fctimeout n - Set FC timeout in sec (e.g. n = 5)
config debuglat n - Set debug GPS lat * 10000000 (e.g. n = 501004900)
Expand All @@ -168,9 +205,3 @@ rfp - Send fake plane via radio
movefakeplanes - Move fake plane
mfp - Move fake plane
```

## Contact

[Facebook Group](https://www.facebook.com/groups/360607501179901/)

[Patreon](https://www.patreon.com/inavradar)
Binary file added docs/video.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
90 changes: 90 additions & 0 deletions src/inavradarlogo.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
// 'InavRadarLogo', 128x64px
#define logo_width_s 128
#define logo_height_s 64
const uint8_t logo_bits_s [] PROGMEM = {
0xC0, 0x01, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xC0, 0x34, 0x00, 0x04, 0x08, 0x00,
0x80, 0x00, 0x00, 0x0C, 0x40, 0x00, 0x00, 0x40, 0x0C, 0x18, 0x60, 0x60,
0x00, 0x0C, 0x1C, 0x00, 0x80, 0x01, 0x00, 0x0E, 0xC0, 0x00, 0x00, 0x60,
0x04, 0x10, 0x20, 0xC0, 0x00, 0x04, 0x18, 0x00, 0x80, 0x01, 0x00, 0x0A,
0x80, 0x00, 0x00, 0x30, 0x02, 0x30, 0x10, 0x80, 0x00, 0x0C, 0x38, 0x00,
0x80, 0x01, 0x00, 0x1A, 0x80, 0x01, 0x00, 0x30, 0x82, 0x20, 0x10, 0x04,
0x01, 0x0C, 0x6C, 0x00, 0x80, 0x01, 0x00, 0x13, 0x80, 0x01, 0x00, 0x10,
0xC2, 0x21, 0x10, 0x0E, 0x01, 0x04, 0x4C, 0x00, 0x80, 0x00, 0x00, 0x33,
0x00, 0x01, 0x00, 0x18, 0xC3, 0x21, 0x18, 0x0E, 0x01, 0x0C, 0xCC, 0x00,
0x80, 0x01, 0x80, 0x31, 0x00, 0x03, 0x00, 0x18, 0x82, 0x23, 0x18, 0x07,
0x01, 0x0C, 0x8C, 0x01, 0x80, 0x01, 0x80, 0x21, 0x00, 0x03, 0x00, 0x08,
0x06, 0x26, 0x90, 0x81, 0x00, 0x0C, 0x88, 0x01, 0x80, 0x01, 0xC0, 0x60,
0x00, 0x06, 0x00, 0x0C, 0x04, 0x8C, 0x42, 0xC0, 0x00, 0x04, 0x0C, 0x03,
0x80, 0x00, 0xC0, 0x60, 0x00, 0x06, 0x00, 0x0C, 0x0C, 0x48, 0x6A, 0x60,
0x00, 0x0C, 0x0C, 0x06, 0x80, 0x01, 0x40, 0xC0, 0x00, 0x06, 0x00, 0x06,
0xB0, 0x62, 0x18, 0x34, 0x00, 0x0C, 0x0C, 0x0C, 0x80, 0x01, 0x60, 0xC0,
0x00, 0x0C, 0x00, 0x06, 0xE0, 0x11, 0x10, 0x0F, 0x00, 0x04, 0x0C, 0x0C,
0x80, 0x00, 0x60, 0x80, 0x00, 0x0C, 0x00, 0x02, 0x00, 0x20, 0x10, 0x00,
0x00, 0x0C, 0x0C, 0x18, 0x80, 0x01, 0x20, 0x80, 0x01, 0x18, 0x00, 0x03,
0x00, 0x10, 0x10, 0x00, 0x00, 0x0C, 0x08, 0x30, 0x80, 0x01, 0x30, 0x80,
0x01, 0x18, 0x00, 0x03, 0x00, 0x20, 0x20, 0x00, 0x00, 0x0C, 0x0C, 0x30,
0x80, 0x01, 0x30, 0x00, 0x03, 0x18, 0x80, 0x01, 0x00, 0x20, 0x18, 0x00,
0x00, 0x04, 0x0C, 0x60, 0x80, 0x01, 0x18, 0x00, 0x03, 0x30, 0x80, 0x01,
0x00, 0xA0, 0x18, 0x00, 0x00, 0x0C, 0x08, 0xC0, 0x80, 0x00, 0x18, 0x00,
0x02, 0x30, 0x80, 0x00, 0x00, 0xE0, 0x0B, 0x00, 0x00, 0x0C, 0x0C, 0xC0,
0x80, 0x01, 0x08, 0x00, 0x06, 0x20, 0xC0, 0x00, 0xF0, 0x43, 0x0A, 0x3F,
0x00, 0x0C, 0x0C, 0x80, 0x81, 0x01, 0x2C, 0x24, 0x06, 0x60, 0xC0, 0x00,
0x18, 0x80, 0x06, 0x60, 0x00, 0x0C, 0x08, 0x00, 0x83, 0x01, 0xFC, 0xFF,
0x0F, 0x60, 0x60, 0x00, 0x0C, 0x8C, 0x63, 0xC0, 0x00, 0x04, 0x0C, 0x00,
0x87, 0x00, 0x06, 0x00, 0x0C, 0x40, 0x60, 0x00, 0x04, 0x04, 0xC2, 0x80,
0x00, 0x0C, 0x08, 0x00, 0x86, 0x01, 0x06, 0x00, 0x08, 0xC0, 0x60, 0x00,
0x06, 0x26, 0x98, 0x81, 0x01, 0x0C, 0x0C, 0x00, 0x8C, 0x01, 0x02, 0x00,
0x18, 0xC0, 0x30, 0x00, 0xC2, 0x21, 0x10, 0x07, 0x01, 0x0C, 0x0C, 0x00,
0x98, 0x00, 0x03, 0x00, 0x18, 0x80, 0x31, 0x00, 0xC2, 0x21, 0x08, 0x0E,
0x01, 0x04, 0x0C, 0x00, 0x98, 0x01, 0x03, 0x00, 0x10, 0x80, 0x11, 0x00,
0xC2, 0x21, 0x10, 0x0E, 0x01, 0x0C, 0x08, 0x00, 0xB0, 0x01, 0x01, 0x00,
0x30, 0x00, 0x19, 0x00, 0x02, 0x30, 0x10, 0x80, 0x01, 0x0C, 0x08, 0x00,
0xA0, 0x80, 0x01, 0x00, 0x30, 0x00, 0x1B, 0x00, 0x06, 0x10, 0x30, 0x80,
0x00, 0x04, 0x0C, 0x00, 0xE0, 0x81, 0x01, 0x00, 0x60, 0x00, 0x0B, 0x00,
0x0C, 0x18, 0x20, 0xC0, 0x00, 0x0C, 0x0C, 0x00, 0xC0, 0xC1, 0x00, 0x00,
0x60, 0x00, 0x0E, 0x00, 0x18, 0x0C, 0xC0, 0x60, 0x00, 0x0C, 0x0C, 0x00,
0x80, 0xC0, 0x00, 0x00, 0xC0, 0x00, 0x0E, 0x00, 0xF0, 0x07, 0x80, 0x1F,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xA8, 0x00, 0x00, 0x04, 0x00, 0x50, 0x00, 0x00, 0x04, 0x00, 0xA4, 0x00,
0x00, 0x00, 0x00, 0x10, 0xBE, 0x07, 0x00, 0x04, 0x00, 0xBE, 0x03, 0x00,
0x04, 0x00, 0xAC, 0x07, 0x00, 0x00, 0x00, 0x1E, 0x04, 0x0C, 0x00, 0x0C,
0x00, 0x02, 0x0C, 0x00, 0x04, 0x00, 0x06, 0x08, 0x00, 0x00, 0x80, 0x3F,
0x04, 0x18, 0x00, 0x0E, 0x00, 0x03, 0x08, 0x00, 0x0E, 0x00, 0x06, 0x18,
0x00, 0x00, 0xF0, 0x3F, 0x06, 0x10, 0x00, 0x0A, 0x00, 0x02, 0x18, 0x00,
0x0A, 0x00, 0x04, 0x10, 0x00, 0x00, 0xF8, 0x7F, 0x06, 0x10, 0x00, 0x1A,
0x00, 0x02, 0x10, 0x00, 0x1A, 0x00, 0x06, 0x10, 0x00, 0x00, 0xFF, 0x7F,
0x04, 0x30, 0x00, 0x11, 0x00, 0x03, 0x10, 0x00, 0x13, 0x00, 0x04, 0x30,
0x00, 0xC0, 0xFF, 0x7F, 0x06, 0x30, 0x00, 0x11, 0x00, 0x02, 0x30, 0x00,
0x11, 0x00, 0x04, 0x30, 0x00, 0xF0, 0xFF, 0x3F, 0x04, 0x10, 0x00, 0x21,
0x00, 0x02, 0x30, 0x00, 0x31, 0x00, 0x06, 0x10, 0x00, 0xFC, 0xFF, 0x7F,
0x06, 0x18, 0x80, 0x21, 0x00, 0x02, 0x30, 0x80, 0x20, 0x00, 0x04, 0x18,
0x80, 0xFF, 0xFF, 0xFF, 0x04, 0x0C, 0x80, 0x20, 0x00, 0x03, 0x20, 0x80,
0x20, 0x00, 0x06, 0x08, 0xE0, 0xFF, 0xFF, 0x7F, 0x06, 0x07, 0x80, 0x60,
0x00, 0x02, 0x30, 0x80, 0x60, 0x00, 0x04, 0x06, 0x78, 0xFF, 0xFF, 0x7F,
0xFC, 0x01, 0xC0, 0x40, 0x00, 0x02, 0x20, 0xC0, 0x40, 0x00, 0xFE, 0x03,
0xF6, 0xFE, 0xFF, 0x7F, 0x06, 0x01, 0x40, 0x40, 0x00, 0x03, 0x30, 0x40,
0x40, 0x00, 0x04, 0x01, 0xF8, 0xFD, 0xFF, 0xFF, 0x04, 0x03, 0xC0, 0xCA,
0x00, 0x02, 0x30, 0x40, 0xE1, 0x00, 0x04, 0x03, 0xC0, 0xFF, 0xFF, 0x7F,
0x04, 0x06, 0x60, 0xF9, 0x00, 0x02, 0x30, 0xE0, 0xBB, 0x00, 0x06, 0x06,
0x00, 0xFF, 0xFF, 0x7F, 0x06, 0x04, 0x20, 0x80, 0x00, 0x02, 0x10, 0x20,
0x80, 0x00, 0x04, 0x04, 0x00, 0xF8, 0xFF, 0x7F, 0x04, 0x0C, 0x20, 0x80,
0x01, 0x02, 0x10, 0x20, 0x80, 0x01, 0x04, 0x0C, 0x00, 0xE0, 0xFF, 0x7F,
0x06, 0x18, 0x30, 0x00, 0x01, 0x02, 0x18, 0x30, 0x00, 0x01, 0x04, 0x18,
0x00, 0x00, 0xFF, 0x7F, 0x06, 0x10, 0x10, 0x00, 0x01, 0x03, 0x08, 0x10,
0x00, 0x03, 0x06, 0x10, 0x00, 0x00, 0xFE, 0x7F, 0x04, 0x30, 0x18, 0x00,
0x03, 0x02, 0x0C, 0x18, 0x00, 0x03, 0x04, 0x30, 0x00, 0x00, 0xF0, 0x3F,
0x06, 0x60, 0x18, 0x00, 0x02, 0xEE, 0x03, 0x18, 0x00, 0x02, 0x04, 0x60,
0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00,
0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, };
14 changes: 11 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <SSD1306.h>
#include <EEPROM.h>
#include <main.h>

#include <inavradarlogo.h>
#include <math.h>
#include <cmath>

Expand Down Expand Up @@ -545,6 +545,13 @@ void display_draw() {
display.display();
}

void display_logo() {
display.drawXbm(0, 0, logo_width_s, logo_height_s, logo_bits_s);
display.display();
delay(2000);
display.clear();
}

// -------- MSP and FC


Expand Down Expand Up @@ -631,13 +638,14 @@ void IRAM_ATTR handleInterrupt() {
}


// -----------------------------
// ----------------------------- setup

void setup() {

set_mode(LORA_PERF_MODE);

display_init();
display_logo();

display.drawString(0, 0, "RADAR VERSION");
display.drawString(90, 0, VERSION);
Expand Down Expand Up @@ -980,7 +988,7 @@ if (sys.now > sys.msp_next_cycle && sys.lora_slot < 4 && curr.host != HOST_NONE
sys.stats_updated = sys.now;
}


// LED blinker

if (sys.lora_tick % 6 == 0) {
Expand Down

0 comments on commit 7f701c8

Please sign in to comment.