News

moodlite - Coming soon


Setting NPT_ON or MQTT on to true gives compiler errors

fetchbeer · 381

fetchbeer

  • Newbie
  • *
    • Posts: 1
    • Likes: +0/-0
    • View Profile
on: February 05, 2019, 05:42:30 AM
Alright, so I thought I'd play with the NPT and MQTT settings, so I switched the flags to true on both of them, and the program refuses to compile.  As the best I'd gotten playing with the webpage settings was effectively a time since turned on, I figured this was where to actually turn it on.

What obvious thing am I missing?  I think the only thing in the code that I've messed with other than this was the wifi settings.

Quote
Arduino: 1.8.8 (Windows 8.1), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, 4M (1M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

WARNING: library Timezone claims to run on (avr) architecture(s) and may be incompatible with your current board which runs on (esp8266) architecture(s).
In file included from D:\Moodlite_2019_01_27-V2.0\Arduino\Moodlite\Moodlite.ino:31:0:

C:\Users\*****\Documents\Arduino\libraries\FastLED/FastLED.h:14:21: note: #pragma message: FastLED version 3.002.001

 #    pragma message "FastLED version 3.002.001"

                     ^

In file included from C:\Users\*****\Documents\Arduino\libraries\FastLED/FastLED.h:65:0,

                 from D:\Moodlite_2019_01_27-V2.0\Arduino\Moodlite\Moodlite.ino:31:

C:\Users\*****\Documents\Arduino\libraries\FastLED/fastspi.h:110:23: note: #pragma message: No hardware SPI pins defined.  All SPI access will default to bitbanged output

 #      pragma message "No hardware SPI pins defined.  All SPI access will default to bitbanged output"

                       ^

D:\Moodlite_2019_01_27-V2.0\Arduino\Moodlite\Moodlite.ino: In function 'void setup()':

Moodlite:594:58: error: invalid conversion from 'void (*)(void*)' to 'void (*)()' [-fpermissive]

     trNtpCheckServer.every(TR3H, ntpCheckServer, (void*)0);

                                                          ^

In file included from D:\Moodlite_2019_01_27-V2.0\Arduino\Moodlite\Moodlite.ino:59:0:

C:\Program Files (x86)\Arduino\libraries\Timer-master/Timer.h:41:10: error:   initializing argument 2 of 'int8_t Timer::every(long unsigned int, void (*)(), int)' [-fpermissive]

   int8_t every(unsigned long period, void (*callback)(void), int repeatCount);

          ^

Moodlite:594:58: error: invalid conversion from 'void*' to 'int' [-fpermissive]

     trNtpCheckServer.every(TR3H, ntpCheckServer, (void*)0);

                                                          ^

In file included from D:\Moodlite_2019_01_27-V2.0\Arduino\Moodlite\Moodlite.ino:59:0:

C:\Program Files (x86)\Arduino\libraries\Timer-master/Timer.h:41:10: error:   initializing argument 3 of 'int8_t Timer::every(long unsigned int, void (*)(), int)' [-fpermissive]

   int8_t every(unsigned long period, void (*callback)(void), int repeatCount);

          ^

Moodlite:604:63: error: invalid conversion from 'void (*)(void*)' to 'void (*)()' [-fpermissive]

     trMqttCheckMessages.every(TR1S, mqttCheckMessage, (void*)0);

                                                               ^

In file included from D:\Moodlite_2019_01_27-V2.0\Arduino\Moodlite\Moodlite.ino:59:0:

C:\Program Files (x86)\Arduino\libraries\Timer-master/Timer.h:41:10: error:   initializing argument 2 of 'int8_t Timer::every(long unsigned int, void (*)(), int)' [-fpermissive]

   int8_t every(unsigned long period, void (*callback)(void), int repeatCount);

          ^

Moodlite:604:63: error: invalid conversion from 'void*' to 'int' [-fpermissive]

     trMqttCheckMessages.every(TR1S, mqttCheckMessage, (void*)0);

                                                               ^

In file included from D:\Moodlite_2019_01_27-V2.0\Arduino\Moodlite\Moodlite.ino:59:0:

C:\Program Files (x86)\Arduino\libraries\Timer-master/Timer.h:41:10: error:   initializing argument 3 of 'int8_t Timer::every(long unsigned int, void (*)(), int)' [-fpermissive]

   int8_t every(unsigned long period, void (*callback)(void), int repeatCount);

          ^

Moodlite:606:59: error: invalid conversion from 'void (*)(void*)' to 'void (*)()' [-fpermissive]

     trMqttSendStatus.every(TR30M, mqttSendStatus, (void*)0);

                                                           ^

In file included from D:\Moodlite_2019_01_27-V2.0\Arduino\Moodlite\Moodlite.ino:59:0:

C:\Program Files (x86)\Arduino\libraries\Timer-master/Timer.h:41:10: error:   initializing argument 2 of 'int8_t Timer::every(long unsigned int, void (*)(), int)' [-fpermissive]

   int8_t every(unsigned long period, void (*callback)(void), int repeatCount);

          ^

Moodlite:606:59: error: invalid conversion from 'void*' to 'int' [-fpermissive]

     trMqttSendStatus.every(TR30M, mqttSendStatus, (void*)0);

                                                           ^

In file included from D:\Moodlite_2019_01_27-V2.0\Arduino\Moodlite\Moodlite.ino:59:0:

C:\Program Files (x86)\Arduino\libraries\Timer-master/Timer.h:41:10: error:   initializing argument 3 of 'int8_t Timer::every(long unsigned int, void (*)(), int)' [-fpermissive]

   int8_t every(unsigned long period, void (*callback)(void), int repeatCount);

          ^

exit status 1
invalid conversion from 'void (*)(void*)' to 'void (*)()' [-fpermissive]

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.



MaxiZ

  • Newbie
  • *
    • Posts: 5
    • Likes: +1/-0
    • View Profile
Reply #1 on: February 06, 2019, 06:40:01 PM
I have the same problem.



ARN

  • Newbie
  • *
    • Posts: 12
    • Likes: +1/-0
    • View Profile
Reply #2 on: February 07, 2019, 01:54:26 AM
I have not tried to work with mqtt or ntp yet but my experience has been that the source code is not to be changed, compile it "as is" and the changes are done on the web module when is set for your network.



MaxiZ

  • Newbie
  • *
    • Posts: 5
    • Likes: +1/-0
    • View Profile
Reply #3 on: February 07, 2019, 10:09:51 AM
But you have to flag them as true otherwise it will not use ntp or mqtt.



shiryou

  • moodlite Developer
  • Newbie
  • *****
    • Posts: 45
    • Likes: +4/-0
    • View Profile
Reply #4 on: February 07, 2019, 11:42:22 AM
never see this error before, maybe are you missing some library???

---- edit ----
All the errors are about your timezone library. look the first message you get:

WARNING: library Timezone claims to run on (avr) architecture(s) and may be incompatible with your current board which runs on (esp8266) architecture(s).
In file included from D:\Moodlite_2019_01_27-V2.0\Arduino\Moodlite\Moodlite.ino:31:0:

« Last Edit: February 07, 2019, 12:37:36 PM by shiryou »



MaxiZ

  • Newbie
  • *
    • Posts: 5
    • Likes: +1/-0
    • View Profile
Reply #5 on: February 07, 2019, 12:41:32 PM
Yes, checked it again, I have all the libraries that are required, at least all of them from the wiki.

The Timezone error is aparrently always there and shouldn't be a problem, (again from the wiki).



murf3ry

  • Newbie
  • *
    • Posts: 1
    • Likes: +0/-0
    • View Profile
Reply #6 on: February 20, 2019, 01:48:53 PM

I had the same problem. I could solve it by adding the libraries from the Github page. :)

https://github.com/spigotx/Moodlite/tree/master/Libraries



MaxiZ

  • Newbie
  • *
    • Posts: 5
    • Likes: +1/-0
    • View Profile
Reply #7 on: February 21, 2019, 09:53:11 AM
Perfect, thanks. That also solved my problem.



 


SMF spam blocked by CleanTalk