Skip to content
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
2 changes: 1 addition & 1 deletion Template/MFCustomDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "commandmessenger.h"
#include "allocateMem.h"
#include "MFEEPROM.h"
#ifdef HAS_CONFIG_IN_FLASH
#if defined(HAS_CONFIG_IN_FLASH)
#include "MFCustomDevicesConfig.h"
#else
const char CustomDeviceConfig[] PROGMEM = {};
Expand Down
35 changes: 29 additions & 6 deletions Template/MyCustomDevice_platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ build_flags =
;-DMF_CUSTOMDEVICE_HAS_UPDATE ; if the custom device needs to be updated, uncomment this. W/o the following define it will be done each loop()
;-DMF_CUSTOMDEVICE_POLL_MS=10 ; time in ms between updating custom device, uncomment this if custom device needs to be updated regulary
;-DHAS_CONFIG_IN_FLASH ; undefine this and add your configuration to MFCustomDevicesConfig.h to save the config in Flash !!Core FW version must be at least 2.5.2!!
;-DREVERSED_OUTPUT_OUTPUT ; for reversed output logic on outputs
;-DREVERSED_OUTPUT_OUTPUTSHIFTER ; for reversed output logic on outputshifter
;-DDEBUG2CMDMESSENGER ; uncomment this to get debug messages for the connector log
-I./src/src/MF_CustomDevice ; don't change this one!
-I./Template ; Include files for your custom device, replace "Template" by your folder name
build_src_filter =
+<../Template> ; build files for your custom device, replace "Template" by your folder name
lib_deps = ; You can add additional libraries if required
custom_core_firmware_version = 2.5.1 ; define the version from the core firmware files your build should base on
custom_core_firmware_version = 3.0.0 ; define the version from the core firmware files your build should base on
custom_source_folder = Template ; path to your Custom Device Sources, replace "Template" by your folder name
custom_community_project = YourProject ; Folder name inside zip file, also ZIP file name if "custom_zip_filename" is not changed
custom_zip_filename = ${env_template.custom_community_project} ; Name of the zip-file, overwrite it to define an different zip-file name
Expand All @@ -26,9 +29,13 @@ board = megaatmega2560
framework = arduino
build_flags =
${env_template.build_flags} ; don't change this one!
-I./src/_Boards/Atmel/Board_Mega ; Include the required board definition. If you need your own definition, adapt this to your path (e.g. -I./CustomDevices/_template/_Boards)
'-DMOBIFLIGHT_TYPE="Mobiflight Template Mega"' ; this must match with "MobiFlightType" within the .json file
'-DMOBIFLIGHT_NAME="Mobiflight Template"' ; this will show up as Name in the settings dialog unless it gets change from there
-DMEMLEN_CONFIG=1496 ; max. size for config which wil be stored in EEPROM
-DMEMLEN_NAMES_BUFFER=1000 ; max. size for configBuffer, contains only names from inputs
-DMF_MAX_DEVICEMEM=1600 ; max. memory size for devices
build_unflags =
;-DMF_STEPPER_SUPPORT ; this is just an example how to deactivate a device
build_src_filter =
${env.build_src_filter} ; don't change this one!
${env_template.build_src_filter} ; don't change this one!
Expand All @@ -51,9 +58,13 @@ board = sparkfun_promicro16
framework = arduino
build_flags =
${env_template.build_flags} ; don't change this one!
-I./src/_Boards/Atmel/Board_ProMicro ; Include the required board definition. If you need your own definition, adapt this to your path (e.g. -I./CustomDevices/_template/_Boards)
'-DMOBIFLIGHT_TYPE="Mobiflight Template Micro"' ; this must match with "MobiFlightType" within the .json file
'-DMOBIFLIGHT_NAME="Mobiflight Template"' ; this will show up as Name in the settings dialog unless it gets change from there
-DMEMLEN_CONFIG=440 ; max. size for config which wil be stored in EEPROM
-DMEMLEN_NAMES_BUFFER=350 ; max. size for configBuffer, contains only names from inputs
-DMF_MAX_DEVICEMEM=470 ; max. memory size for devices
build_unflags =
-DMF_STEPPER_SUPPORT ; this is just an example how to deactivate a device, flash for ProMicro will be exceed with stepper support
build_src_filter =
${env.build_src_filter} ; don't change this one!
${env_template.build_src_filter} ; don't change this one!
Expand All @@ -77,9 +88,13 @@ board = uno
framework = arduino
build_flags =
${env_template.build_flags} ; don't change this one!
-I./src/_Boards/Atmel/Board_Uno ; Include the required board definition. If you need your own definition, adapt this to your path (e.g. -I./CustomDevices/_template/_Boards)
'-DMOBIFLIGHT_TYPE="Mobiflight Template Uno"' ; this must match with "MobiFlightType" within the .json file
'-DMOBIFLIGHT_NAME="Mobiflight Template"' ; this will show up as Name in the settings dialog unless it gets change from there
-DMEMLEN_CONFIG=286 ; max. size for config which wil be stored in EEPROM
-DMEMLEN_NAMES_BUFFER=220 ; max. size for configBuffer, contains only names from inputs
-DMF_MAX_DEVICEMEM=420 ; max. memory size for devices
build_unflags =
;-DMF_STEPPER_SUPPORT ; this is just an example how to deactivate a device
build_src_filter =
${env.build_src_filter} ; don't change this one!
${env_template.build_src_filter} ; don't change this one!
Expand All @@ -103,9 +118,13 @@ board = nanoatmega328
framework = arduino
build_flags =
${env_template.build_flags} ; don't change this one!
-I./src/_Boards/Atmel/Board_Nano ; Include the required board definition. If you need your own definition, adapt this to your path (e.g. -I./CustomDevices/_template/_Boards)
'-DMOBIFLIGHT_TYPE="Mobiflight Template Nano"' ; this must match with "MobiFlightType" within the .json file
'-DMOBIFLIGHT_NAME="Mobiflight Template"' ; this will show up as Name in the settings dialog unless it gets change from there
-DMEMLEN_CONFIG=286 ; max. size for config which wil be stored in EEPROM
-DMEMLEN_NAMES_BUFFER=220 ; max. size for configBuffer, contains only names from inputs
-DMF_MAX_DEVICEMEM=420 ; max. memory size for devices
build_unflags =
;-DMF_STEPPER_SUPPORT ; this is just an example how to deactivate a device
build_src_filter =
${env.build_src_filter} ; don't change this one!
${env_template.build_src_filter} ; don't change this one!
Expand Down Expand Up @@ -133,9 +152,13 @@ lib_ldf_mode = chain+
upload_protocol = mbed
build_flags =
${env_template.build_flags} ; don't change this one!
-I./src/_Boards/RaspberryPi/Pico ; Include the required board definition. If you need your own definition, adapt this to your path (e.g. -I./CustomDevices/_template/_Boards)
'-DMOBIFLIGHT_TYPE="Mobiflight Template RaspiPico"' ; this must match with "MobiFlightType" within the .json file
'-DMOBIFLIGHT_NAME="Mobiflight Template"' ; this will show up as Name in the settings dialog unless it gets change from there
-DMEMLEN_CONFIG=1496 ; max. size for config which wil be stored in EEPROM
-DMEMLEN_NAMES_BUFFER=1000 ; max. size for configBuffer, contains only names from inputs
-DMF_MAX_DEVICEMEM=1000 ; max. memory size for devices
build_unflags =
;-DMF_STEPPER_SUPPORT ; this is just an example how to deactivate a device
build_src_filter =
${env.build_src_filter} ; don't change this one!
${env_template.build_src_filter} ; don't change this one!
Expand Down
11 changes: 10 additions & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,16 @@ build_flags =
-DMESSENGERBUFFERSIZE=96
-DMAXSTREAMBUFFERSIZE=96
-DDEFAULT_TIMEOUT=5000
; -DDEBUG2CMDMESSENGER=1
-DMF_SEGMENT_SUPPORT
-DMF_LCD_SUPPORT
-DMF_STEPPER_SUPPORT
-DMF_SERVO_SUPPORT
-DMF_ANALOG_SUPPORT
-DMF_OUTPUT_SHIFTER_SUPPORT
-DMF_INPUT_SHIFTER_SUPPORT
-DMF_MUX_SUPPORT
-DMF_MUX_SUPPORT
-DMF_DIGIN_MUX_SUPPORT
-I./src/src
-I./src/src/MF_Analog
-I./src/src/MF_Button
Expand Down