Made the device name prefix configurable from platformio.ini
This commit is contained in:
@@ -68,6 +68,7 @@ build_flags =
|
||||
build_flags =
|
||||
${common_env_data.build_flags}
|
||||
${peters_platine.build_flags}
|
||||
-DDEVICE_PREFIX=bobbyquad
|
||||
-DFEATURE_3WIRESW
|
||||
-DPINS_3WIRESW_OUT=0
|
||||
-DPINS_3WIRESW_IN1=16
|
||||
@@ -131,6 +132,7 @@ build_flags =
|
||||
${common_env_data.build_flags}
|
||||
${peters_platine.build_flags}
|
||||
${default_limits.build_flags}
|
||||
-DDEVICE_PREFIX=bobbycar
|
||||
-DDEFAULT_GASMIN=400
|
||||
-DDEFAULT_GASMAX=2000
|
||||
-DDEFAULT_BREMSMIN=600
|
||||
@@ -179,6 +181,7 @@ upload_port = /dev/ttyUSB*
|
||||
build_flags =
|
||||
${common_env_data.build_flags}
|
||||
${peters_platine.build_flags}
|
||||
-DDEVICE_PREFIX=bobbyquad
|
||||
; -DFEATURE_3WIRESW
|
||||
; -DPINS_3WIRESW_OUT=0
|
||||
; -DPINS_3WIRESW_IN1=16
|
||||
@@ -214,6 +217,7 @@ upload_speed = 921600
|
||||
|
||||
build_flags =
|
||||
${common_env_data.build_flags}
|
||||
-DDEVICE_PREFIX=testbench
|
||||
-DILI9341_DRIVER=1
|
||||
-DTFT_MOSI=22
|
||||
-DTFT_SCLK=21
|
||||
@@ -260,6 +264,7 @@ upload_speed = 921600
|
||||
|
||||
build_flags =
|
||||
${common_env_data.build_flags}
|
||||
-DDEVICE_PREFIX=bobbyquad
|
||||
-DUSER_SETUP_LOADED=1
|
||||
-DRPI_DISPLAY_TYPE
|
||||
-DILI9486_DRIVER
|
||||
|
@@ -66,7 +66,7 @@ void setup()
|
||||
{
|
||||
uint8_t macAddress[6];
|
||||
WiFi.macAddress(&macAddress[0]);
|
||||
std::sprintf(deviceName, "bobbyquad_%02hhx%02hhx%02hhx", macAddress[3], macAddress[4], macAddress[5]);
|
||||
std::sprintf(deviceName, __STRINGIFY(DEVICE_PREFIX) "_%02hhx%02hhx%02hhx", macAddress[3], macAddress[4], macAddress[5]);
|
||||
}
|
||||
|
||||
WiFi.mode(WIFI_AP_STA);
|
||||
|
Reference in New Issue
Block a user