arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
22.19k stars 4.81k forks source link

xdrv_38_ping.ino does not compile without errors #9148

Closed robclark56 closed 4 years ago

robclark56 commented 4 years ago

PROBLEM DESCRIPTION

Add this line to user_config_override.h

define USE_PING

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!

- [x] Provide the output of this command: `Status 0`:

17:52:50 RSL: STATUS = {"Status":{"Module":18,"FriendlyName":["Sm-IC","Sm-IC2","Sm-IC3","Sm-IC4"],"Topic":"SmIC_C0B455","ButtonTopic":"0","Power":0,"PowerOnState":3,"LedState":1,"LedMask":"FFFF","SaveData":1,"SaveState":0,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0}}

- [x] Provide the output of the Console log output when you experience your issue; if applicable:
  _(Please use_ `weblog 4` _for more debug information)_

n/a


### TO REPRODUCE
Use Arduino compiler with USE_PING defined.
This pulls in xdrv_38_ping.ino 

### EXPECTED BEHAVIOUR
No compile errors

### SCREENSHOTS
Compiler errors

xdrv_38_ping:212:6: error: previous declaration of 'void t_ping_register_pcb()' with 'C++' linkage void t_ping_register_pcb(void) { ^ xdrv_38_ping:212:30: error: conflicts with new declaration with 'C' linkage void t_ping_register_pcb(void) { ^

C:\Users\clark\Desktop\ESP\arduino-1.8.12\portable\sketchbook\Relay4CH\xdrv_38_ping.ino: In function 'void t_ping_deregister_pcb()': xdrv_38_ping:222:6: error: previous declaration of 'void t_ping_deregister_pcb()' with 'C++' linkage void t_ping_deregister_pcb(void) { ^ xdrv_38_ping:222:34: error: conflicts with new declaration with 'C' linkage void t_ping_deregister_pcb(void) { ^ C:\Users\clark\Desktop\ESP\arduino-1.8.12\portable\sketchbook\Relay4CH\xdrv_38_ping.ino: In function 'bool t_ping_start(uint32_t, uint32_t)': xdrv_38_ping:232:6: error: previous declaration of 'bool t_ping_start(uint32_t, uint32_t)' with 'C++' linkage bool t_ping_start(uint32_t ip, uint32_t count) { ^ xdrv_38_ping:232:48: error: conflicts with new declaration with 'C' linkage bool t_ping_start(uint32_t ip, uint32_t count) {



### ADDITIONAL CONTEXT
Have probably done 200+ successfull compiles with my current environment. But only when pulling in xdrv_38_ping.ino do I see these errors.

Have not edited xdrv_38_ping.ino 

**(Please, remember to close the issue when the problem has been addressed)**
s-hadinger commented 4 years ago

Please use Platform.io instead of Arduino IDE.

robclark56 commented 4 years ago

OK - Will give platform.io a go.

But is this statement no longer true:

https://tasmota.github.io/docs/Compile-your-build/ ==> Compiling Tools If you want to modify the code or default settings you can use:

PlatformIO - setup and configure PlatformIO for Tasmota compilation and upload PlatformIO CLI - how to flash Tasmota using the PlatformIO command line interface on Linux PlatformIO-Core - automate firmware builds using PlatformIO-Core and flash with esptool Visual Studio Code - setup and configure Visual Studio Code with PlatformIO for Tasmota Atom - beginner guide building Tasmota firmware using Atom with PlatformIO plugin Arduino IDE - setup and configure Arduino IDE for Tasmota compilation and upload Docker Tasmota - compile from a Docker container using PlatformIO

s-hadinger commented 4 years ago

Some of the new feature don't compile on Arduino IDE.

robclark56 commented 4 years ago

xdrv_38_ping.ino complied OK with PlatformIO.

Thanks for the suggestion.

Closing issue.