Skip to content

Commit

Permalink
board defintions in template.ini according core repo
Browse files Browse the repository at this point in the history
  • Loading branch information
elral committed Oct 31, 2024
1 parent a6abb27 commit 8ef81e5
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 6 deletions.
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
42 changes: 37 additions & 5 deletions Template/MyCustomDevice_platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@ 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
-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/MF_CustomDevice ; don't change this one!
-I./Template ; Include files for your custom device, replace "Template" by your folder name
build_src_filter =
Expand All @@ -26,9 +38,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 +67,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
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 +97,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 +127,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 +161,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

0 comments on commit 8ef81e5

Please sign in to comment.