Skip to content

Check out this repository if you want to create your customized MobiFlight firmware

License

Notifications You must be signed in to change notification settings

MobiFlight/CommunityTemplate

Repository files navigation

Note

This article is for developers who would like to create their own community device implementation. If you are interested in simply using community devices, check out this page

Prerequisites

  • MobiFlight firmware development is done with VSCode and the PlatformIO extension. Make sure to install both.
  • Create a new reposority by using the Community Template repository*
  • Clone this reposority and open it in PlatformIO. Cloning could be directly done within PlatformIO,

Follow the next steps carefully!

Preparing the firmware

  • Open a terminal window within PlatformIO if it's not already opened

image

  • type python renaming.py into the terminal window and answer the 2 questions

image

All required files and folders get renamed according your naming.

Testing

Now it's a good point to test everything you have set up.

The existing firmware itself will do nothing, but you can check if your new community board will show up under the Mobiflight Modules dialog if flashing the firmware to your new board. Additionally you can check if your community device could be choosed and gets uploaded to your board. A new Mega w/o firmware is connected:

image

In the list of firmwares there should be an entry which matches '-DMOBIFLIGHT_TYPE="YourDevice_board"' from YourChangedName_platformio.ini. Choose this entry and your firmware gets uploaded. After this step you should be able to add a community device.

image

For each YourName.YourDevice.device.json a list item with "Type": "YourName_YourDevice" should show up. Choose one of them and check if all pins will show up. If you have more than one community device defined test this with all of them.

image

Implement your community firmware

See all hints in the files. It is also a good idea to check how the examples are set up. The basic GNC255 community device supports an 256x128 OLED, so just one community class is supported. The community device for the FCU and EFIS display from KAV simulation supports five different classes, so it's a good example how to set up two ore more supported devices.

Further information

Special message

There are some special messages with their respective IDs defined:

  • Stop message (-1) - The device should turn off on receiving this message. The message is sent by the Connector any time the MobiFlight execution stops (Stop-button) or the application is shutdown.
  • PowerSavingMode message (-2) - The device should go into a power saving mode (value=1) or wake up from it again (value=0).

Overview how the json files are related

image

About

Check out this repository if you want to create your customized MobiFlight firmware

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •