diff options
author | David Crocker <dcrocker@eschertech.com> | 2018-10-30 01:29:15 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2018-10-30 01:29:15 +0300 |
commit | 891a7ff5fb578a82d3ae43f1748be7a347634bee (patch) | |
tree | 8d435289a7fdf8c9c29fbc5d03b0bcc7ca4845df /src/Networking | |
parent | 5b53947769cc67b79e0c9f316311e43665638c0f (diff) |
2.02RC4 provisional (second attempt)
Allow I2C addresses to be given in hex format
Allow axes to be mapped ot nin-existant driver numbers
More work on object model variable substitution in GCode commands
Added a possible fix for coast-to-end
Diffstat (limited to 'src/Networking')
-rw-r--r-- | src/Networking/ESP8266WiFi/WiFiInterface.cpp | 5 | ||||
-rw-r--r-- | src/Networking/LwipEthernet/LwipEthernetInterface.cpp | 5 | ||||
-rw-r--r-- | src/Networking/Network.cpp | 1 | ||||
-rw-r--r-- | src/Networking/Network.h | 2 | ||||
-rw-r--r-- | src/Networking/W5500Ethernet/W5500Interface.cpp | 5 |
5 files changed, 11 insertions, 7 deletions
diff --git a/src/Networking/ESP8266WiFi/WiFiInterface.cpp b/src/Networking/ESP8266WiFi/WiFiInterface.cpp index bd71e507..ad288202 100644 --- a/src/Networking/ESP8266WiFi/WiFiInterface.cpp +++ b/src/Networking/ESP8266WiFi/WiFiInterface.cpp @@ -167,10 +167,11 @@ WiFiInterface::WiFiInterface(Platform& p) : platform(p), uploader(nullptr), ftpD const ObjectModelTableEntry WiFiInterface::objectModelTable[] = { - { "name", OBJECT_MODEL_FUNC_NOSELF("wifi"), TYPE_OF(const char *), ObjectModelTableEntry::none }, + // These entries must be in alphabetical order + { "gateway", OBJECT_MODEL_FUNC(&(self->gateway)), TYPE_OF(IPAddress), ObjectModelTableEntry::none }, { "ip", OBJECT_MODEL_FUNC(&(self->ipAddress)), TYPE_OF(IPAddress), ObjectModelTableEntry::none }, + { "name", OBJECT_MODEL_FUNC_NOSELF("wifi"), TYPE_OF(const char *), ObjectModelTableEntry::none }, { "netmask", OBJECT_MODEL_FUNC(&(self->netmask)), TYPE_OF(IPAddress), ObjectModelTableEntry::none }, - { "gateway", OBJECT_MODEL_FUNC(&(self->gateway)), TYPE_OF(IPAddress), ObjectModelTableEntry::none } }; DEFINE_GET_OBJECT_MODEL_TABLE(WiFiInterface) diff --git a/src/Networking/LwipEthernet/LwipEthernetInterface.cpp b/src/Networking/LwipEthernet/LwipEthernetInterface.cpp index dc8dd614..ed89f892 100644 --- a/src/Networking/LwipEthernet/LwipEthernetInterface.cpp +++ b/src/Networking/LwipEthernet/LwipEthernetInterface.cpp @@ -149,10 +149,11 @@ LwipEthernetInterface::LwipEthernetInterface(Platform& p) : platform(p), closeDa const ObjectModelTableEntry LwipEthernetInterface::objectModelTable[] = { - { "name", OBJECT_MODEL_FUNC_NOSELF("ethernet"), TYPE_OF(const char *), ObjectModelTableEntry::none }, + // These entries must be in alphabetical order + { "gateway", OBJECT_MODEL_FUNC(&(self->gateway)), TYPE_OF(IPAddress), ObjectModelTableEntry::none }, { "ip", OBJECT_MODEL_FUNC(&(self->ipAddress)), TYPE_OF(IPAddress), ObjectModelTableEntry::none }, + { "name", OBJECT_MODEL_FUNC_NOSELF("ethernet"), TYPE_OF(const char *), ObjectModelTableEntry::none }, { "netmask", OBJECT_MODEL_FUNC(&(self->netmask)), TYPE_OF(IPAddress), ObjectModelTableEntry::none }, - { "gateway", OBJECT_MODEL_FUNC(&(self->gateway)), TYPE_OF(IPAddress), ObjectModelTableEntry::none } }; DEFINE_GET_OBJECT_MODEL_TABLE(LwipEthernetInterface) diff --git a/src/Networking/Network.cpp b/src/Networking/Network.cpp index 179d3a57..424043a5 100644 --- a/src/Networking/Network.cpp +++ b/src/Networking/Network.cpp @@ -70,6 +70,7 @@ static const ObjectModelArrayDescriptor interfaceArrayDescriptor = const ObjectModelTableEntry Network::objectModelTable[] = { + // These entries must be in alphabetical order { "interfaces", OBJECT_MODEL_FUNC_NOSELF(&interfaceArrayDescriptor), TYPE_OF(ObjectModel) | IsArray, ObjectModelTableEntry::none } }; diff --git a/src/Networking/Network.h b/src/Networking/Network.h index 6e86a1b0..41f4c148 100644 --- a/src/Networking/Network.h +++ b/src/Networking/Network.h @@ -80,7 +80,7 @@ public: uint32_t GetHttpReplySeq(); #if SUPPORT_OBJECT_MODEL - void *GetInterface(size_t n) { return interfaces[n]; } + NetworkInterface *GetInterface(size_t n) const { return interfaces[n]; } #endif protected: diff --git a/src/Networking/W5500Ethernet/W5500Interface.cpp b/src/Networking/W5500Ethernet/W5500Interface.cpp index 18f008d0..3d401ff8 100644 --- a/src/Networking/W5500Ethernet/W5500Interface.cpp +++ b/src/Networking/W5500Ethernet/W5500Interface.cpp @@ -44,10 +44,11 @@ W5500Interface::W5500Interface(Platform& p) const ObjectModelTableEntry W5500Interface::objectModelTable[] = { - { "name", OBJECT_MODEL_FUNC_NOSELF("ethernet"), TYPE_OF(const char *), ObjectModelTableEntry::none }, + // These entries must be in alphabetical order + { "gateway", OBJECT_MODEL_FUNC(&(self->gateway)), TYPE_OF(IPAddress), ObjectModelTableEntry::none }, { "ip", OBJECT_MODEL_FUNC(&(self->ipAddress)), TYPE_OF(IPAddress), ObjectModelTableEntry::none }, + { "name", OBJECT_MODEL_FUNC_NOSELF("ethernet"), TYPE_OF(const char *), ObjectModelTableEntry::none }, { "netmask", OBJECT_MODEL_FUNC(&(self->netmask)), TYPE_OF(IPAddress), ObjectModelTableEntry::none }, - { "gateway", OBJECT_MODEL_FUNC(&(self->gateway)), TYPE_OF(IPAddress), ObjectModelTableEntry::none } }; DEFINE_GET_OBJECT_MODEL_TABLE(W5500Interface) |