Skip to content

About

Arduino Project for the F18 Radar Altimeter

Resources

Stars

5 stars

Watchers

1 watching

Forks

Latest commit

 

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project is for the DCSWorld F18 Radar Altimeter. I've adapted the Open Hornet bezel from the Fusion 360 project to cover the display. The rotary encoder for push to test and setting the Min Height is connected to a seperate Arduino Mega and its inputs are handled by it. The display being used is the Waveshare 1.85" LCD without tought screen. https://www.waveshare.com/wiki/ESP32-S3-LCD-1.85

Requirements:

ESP Board: ESP32 by Expressif (tested with version 3.3.1) https://espressif.github.io/arduino-esp32/package_esp32_index.json

LVGL v8.3.11: Install: Arduino IDE → Library Manager → search LVGL → install.

Build and flash (arduino-cli):

FQBN: esp32:esp32:esp32s3:FlashSize=16M,PSRAM=opi,CDCOnBoot=cdc,PartitionScheme=app3M_fat9M_16MB
arduino-cli compile --fqbn <FQBN> --libraries <your Arduino libraries folder> .
arduino-cli upload  --fqbn <FQBN> -p COM6 .

Libraries: LVGL 8.3.11, DCS-BIOS and ArduinoJson (for WiFi). LVGL is configured by the lv_conf.h in this folder (16-bit color with byte swap on, so the display driver does not swap bytes itself). In USB mode DCS-BIOS uses the same serial port as uploads, so close the Serial Monitor while running DCS.

WiFi or USB: DCS_USE_WIFI at the top of the sketch picks the link to the PC.

  • 1 (default): WiFi to DCS-TALK. Copy wifi_config.example.h to wifi_config.h and fill in your network (wifi_config.h is gitignored). The board shows up in DCS-TALK as radalt; change DCS_WIFI_ID if you build more than one. DCS-TALK is found by mDNS, so the PC and the gauge must be on the same network. WiFi runs on its own task on core 0 and starts after the startup demo; received data is handed to the main loop, so drawing stays on one thread. WiFi status lines print on the serial port.
  • 0: USB serial, as before.
DcsWifi.h is DCS-BIOS over WiFi (same protocol as the DCS-BIOS ESP32 WiFi mode, which does not build on core 3.x).

Options in F18-RadarAltimeter.ino:

  • USE_GLASS_OVERLAY (1/0): full-screen glass reflection and bezel shading. Looks better, costs the most CPU.
  • ROTATE_ANTIALIAS (1/0): smooth rotation of the needle and min-height bug. 0 is faster but slightly jagged.
  • LV_USE_PERF_MONITOR in lv_conf.h: set to 1 to show CPU % and FPS at the bottom of the display.

Display layers (back to front): OFF flag, dial, OFF window shade, lamps, min-height bug, needle, mask plate (the needle slides under it between 50 and 0), fixed hub cap, glass overlay. The needle and bug share one rotation center, pixel (179, 180). The hub cap is a separate fixed image so it does not move with the needle.

Startup demo: on power-up the lamps flash, then the needle, min-height bug and OFF flag sweep their full range and back.

Regenerating the bitmaps: the image .c files are generated (RGB565 with ordered dither, 16-bit variants only). The generator scripts and original artwork are not in this repo.

2025-09-25_13-50-20_005 2025-09-08_12-24-30_979 2025-09-08_12-24-21_899

I've included STL files I used to print a mounting base for the display and the Bezel.

Its important to set the IDE up for the LCD Display. I've included a screenshot of my settings.

IDE Settings

## License This project is licensed under a [Custom Non-Commercial License](LICENSE). You can use and modify it for **personal and educational purposes only**. For commercial use, please contact me for permission.

About

Arduino Project for the F18 Radar Altimeter

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages