mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-11 15:22:13 +03:00
Board ID as build flag (#8634)
* Board ID as build flag When using IDE or `arduino-cli board list`, show full board name and FQBN ``` $ arduino-cli.exe board list Port Protocol Type Board Name FQBN Core xxx.xxx.x.xxx network Network Port LOLIN(WEMOS) D1 R2 & mini esp8266com:esp8266:d1_mini esp8266com:esp8266 ``` Also add `description` field to the mDNS response containing the original `{build.board}` string value. resolve #7759 * does not work with recent ide (?) * fixup! does not work with recent ide (?)
This commit is contained in:
@ -31,6 +31,11 @@
|
||||
#include <lwip/igmp.h>
|
||||
#include <lwip/prot/dns.h>
|
||||
|
||||
// should be defined at build time
|
||||
#ifndef ARDUINO_BOARD_ID
|
||||
#define ARDUINO_BOARD_ID "generic"
|
||||
#endif
|
||||
|
||||
namespace esp8266
|
||||
{
|
||||
|
||||
@ -40,16 +45,6 @@ namespace esp8266
|
||||
namespace MDNSImplementation
|
||||
{
|
||||
|
||||
/**
|
||||
STRINGIZE
|
||||
*/
|
||||
#ifndef STRINGIZE
|
||||
#define STRINGIZE(x) #x
|
||||
#endif
|
||||
#ifndef STRINGIZE_VALUE_OF
|
||||
#define STRINGIZE_VALUE_OF(x) STRINGIZE(x)
|
||||
#endif
|
||||
|
||||
/**
|
||||
INTERFACE
|
||||
*/
|
||||
@ -1258,7 +1253,7 @@ namespace MDNSImplementation
|
||||
{
|
||||
if ((!addServiceTxt(hService, "tcp_check", "no"))
|
||||
|| (!addServiceTxt(hService, "ssh_upload", "no"))
|
||||
|| (!addServiceTxt(hService, "board", STRINGIZE_VALUE_OF(ARDUINO_BOARD)))
|
||||
|| (!addServiceTxt(hService, "board", ARDUINO_BOARD_ID))
|
||||
|| (!addServiceTxt(hService, "auth_upload", (p_bAuthUpload) ? "yes" : "no")))
|
||||
{
|
||||
removeService(hService);
|
||||
|
@ -132,11 +132,6 @@ namespace esp8266
|
||||
namespace MDNSImplementation
|
||||
{
|
||||
|
||||
// this should be defined at build time
|
||||
#ifndef ARDUINO_BOARD
|
||||
#define ARDUINO_BOARD "generic"
|
||||
#endif
|
||||
|
||||
#define MDNS_IP4_SUPPORT
|
||||
#if LWIP_IPV6
|
||||
//#define MDNS_IP6_SUPPORT
|
||||
|
Reference in New Issue
Block a user